On Dec 17, 2008, at 06:16 AM, Deivy Marck Petrescu wrote: tell application "Safari" to activate delay 1 tell application "SystemUIServer" to display alert "Wait"
What led you to use SystemUIServer to display a dialog? It's not designed to do that. Did you try using System Events? It's designed to handle scripting addition commands.
Not to pick on Deivy, but this is an example of what's wrong with the current scripting additions system. You can force virtually any application to load arbitrary code (scripting additions) and respond to events that the application wasn't designed to support. NOTE: It is intended that some addition commands, like “display alert” and “display dialog”, can be sent to applications with UI, but most scripting addition commands aren't. You shouldn't be able to get arbitrary applications to respond to “open for access”, “read”, “write”, “do shell script” or even “random number”, but you can today.
And applications that weren't designed to be scriptable shouldn't handle “display alert” and “display dialog”. But they do, because the additions system forces them to.
-- Chris Page - AppleScripter
The other, other AppleScript Chris
|