On Dec 17, 2008, at 2:09 PM, Chris Page wrote: 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
Chris go ahead and pick on me, but before reread my message and see if that answers your questions...
You stirred this whole discussion, which is great, and you heard many comments and suggestions, principally related with display dialog. Should it be surprising that we would like more control over the display dialog? It is our way of communicating with the end user or ourselves. Why shouldn't we be able to control all aspects display dialog? Apparently you did not like the answers and suggestions you got. Still, I hope you guys take them into consideration when new changes are possible. Now, as the reason for using SystemServerUI instead of System Events (used in the preceding example) is because the available tool (SE) does not do the job. So, as others have already suggested, if it works temporarily, it works!
|