(Quasi newbie) How 2 script finder to select "OK"

(I hope this isn’t embarrasingly simple)
I have a script that opens a Quark page, but the page always opens with a dialog box “This document needs repairs - repair it?” and there is only one default button available — “OK” . How do I get the script to either ignore this dialog or do the moral equivalent of hitting “OK”?
I’ve tried inserting Sandi’s additions TypeText …

tell application “QuarkXPress™ 4.11”
activate
open QuarkPage use doc prefs yes
(Here’s where the dialog pops up)
TypeText (ASCII character 3)

…and it doesn’t do anything.

For that matter, how does one script keyboard entries in any app?

Thanks,

jon

I prefer using the osaxen “Autotype” to simulate both typing and entering “special” keystrokes from the keyboard.
With this osaxen installed in the Scripting Additions Folder the script line

Autotype “`return”

will simulate a return keystroke.
Notice the special character “`” in the autotype command. This is the keystroke to the left of the number 1 on the standard keyboard.

Autotype is available at
http://osaxen.com/modules.php?op=modload&name=osaxen&file=index&keywords=autotype

Thanks for the tip - I’ve downloaded the trial and tried this snippet…

tell application “Finder”
display dialog “Ya gotta type” default answer “”
AutoType “Something”
end tell

This is where I’m having trouble - the autotyping seems to be geared for use in apps other than the Finder and its dialog boxes. I’m probably missing something really basic here…

Jon

AutoType mentions in its documentation that you cannot put it within the tell block of an application. So, you’d need to do the following:


tell application "Finder"
	display dialog "Ya gotta type" default answer ""
end tell

AutoType "Something"

-- then, start a Finder tell block again, if needed

Autotype isn’t trial no more (if you like full versions :wink: )

http://graphics.stanford.edu/~jedavis/projects/mac/autotype.html

(d/l “autotype.reg.hqx”, which also includes “autoclick” osax)…