• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: blocking user actions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: blocking user actions


  • Subject: Re: blocking user actions
  • From: Ed Stockly <email@hidden>
  • Date: Wed, 17 Dec 2008 16:25:03 -0800

I just dug that script up. It's no longer needed because the process it protected executed so quickly on our new macs (new then) that the issue went away.

I also now see why I didn't take it any further. Once the script was up and running I had no way for it to reliably test that the script that called it was still running. I even asked on this list way back then but hit a dead end.

ES
On Dec 17, 2008, at 1:56 PM, Ed Stockly wrote:

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 (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
@aol.com
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
_______________________________________________
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
References: 
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Shane Stanley <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Ed Stockly <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Rick Gordon <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Rick Gordon <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Deivy Marck Petrescu <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Ed Stockly <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Jon Pugh <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Previous by thread: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by thread: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Index(es):
    • Date
    • Thread