GUI scripting the Open… dialog
GUI scripting the Open… dialog
- Subject: GUI scripting the Open… dialog
- From: Kaspar Fischer <email@hidden>
- Date: Sun, 23 Jul 2006 23:30:53 -0300
Hi,
I am trying to GUI-apple-script the NSOpenPanel via something like
tell application "System Events"
tell process "Blabla"
-- here, the Open dialog is on-screen
delay guiDelay
keystroke "G" using {command down, shift down}
delay guiLongDelay
keystroke (TestsuitePath & "/File.mp3") -- (*)
delay guiLongDelay
click button "Go" of window "Go To Folder"
delay guiDelay
click button "Open" of sheet 1 of doc
delay guiDelay
end tell
end tell
This works from "Script Editor", however only _sometimes_. In some
cases, the marked statement (*) does _not_ select the file "File.mp3"
but merely shows it. The "Script Editor" then gives the error:
System Events got an error: NSReceiverEvaluationScriptError: 4
I don't have a clue why it sometimes works and sometimes not.
I am totally lost. -- Any ideas?
Many thanks,
Kaspar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden