I have a GUI script that selects some menus in an application (Quark). It looks like the code runs asynchronously with the UI events though… that is the code sends the menu selections to Quark and then the AppleScript continues to execute even though Quark may not have processed the menu events yet. I need to have the events finish before the AppleScript continues. I can put a delay in after sending the menu events and this seems to bypass the problem b/c the menu events have finished processing by the time the delay ends, but this isn’t very elegant. Anyone have an idea how to tell if the “System Events” menu selections have finished processing?
tell “system events”
tell application “quark”
select some menu items
delay 1 – rather than delay, need a way to figure out if the menu actions have completed
end tell
end tell