Re: Tell Blocks Considered Harmful (was Re: open for access)
Re: Tell Blocks Considered Harmful (was Re: open for access)
- Subject: Re: Tell Blocks Considered Harmful (was Re: open for access)
- From: Ed Stockly <email@hidden>
- Date: Wed, 17 Dec 2008 13:56:54 -0800
I had one script that launched an applet from the finder. All the
applet did was make sure it was frontmost and display a dialog letting
the user know that a script was running and to go get a cup of coffee.
On idle every few seconds, it would activate itself if it wasn't
frontmost.
The button on the dialog was "Cancel Script".
>>>That's not too difficult to implement. You can place a translucent
(even 100% translucent) window in front of all windows, like Dashboard
does, for example.
Add a floating palette to the mix with the buttons needed to pause or
cancel the script?
When a script does ‘display dialog’ the script waits for the dialog
to be dismissed. It doesn't continue running until then.
Alternatively, you can write
ignoring application responses
display dialog "Hi!"
end
and the script will continue running while the alert is displayed.
But, if the user clicks the Cancel button, the script will never
know, because it ignored the response.
Run the dialog in a new process that would send an AppleEvent back to
the original script when the user clicked "Cancel Script".
ES=
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden