GUI Scripting Architecture & delay
GUI Scripting Architecture & delay
- Subject: GUI Scripting Architecture & delay
- From: Kaspar Fischer <email@hidden>
- Date: Thu, 20 Jul 2006 14:01:22 -0300
Hi everybody,
I am using the GUI Scripting Architecture,
http://www.apple.com/applescript/GUI/
to perform some GUI unit testing of my application. Everything
works like a charm, is easy to use and quite elegant. Congra-
tulations and thanks for this feature of MacOS!
But I encounter one problem again and again and have not found
any decent solution to it: Apparently, the events I send via
AppleScript to "System Events" are not queued first-in-first-out
and so I have (like many others, it seems) to use tons of
delay 1 -- ...or even more seconds!
statements to make sure that the events are really processed
before I do the next step.
This is very cumbersome and unreliable: it makes things that
are actually quite fast very slow (each command takes at least
a second), and if my machine is under load, it can happen that
"delay 1" is not enough and I run into errors.
So my question is very simple: is there a command that waits
until all pending events are handled (and not longer)?
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