• 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: Jon Pugh <email@hidden>
  • Date: Wed, 17 Dec 2008 14:16:51 -0800

At 1:49 PM -0800 12/17/08, Chris Page wrote:
>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.
>
>But how do you relate that to the script and stop the script if the user wants it to stop? That's where it gets tricky.
>
>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.
>
>So, how would we signal the script to stop? Hmm.

The key would be to make it available as an application framework you could embed a script into.  Then it wouldn't be modal.

So when the application starts, it runs your script, which calls "block screen".  This returns after putting up the window and then proceeds to run the rest of the script.  When finished, the script calls "unblock screen" which removes the window.

Since it would need to be an application, it could even remove the block if the script aborted abnormally.

Mark Alldritt talked about adding script application shells like this to Script Debugger.  I think he even had a scheme for adding them, but no one ever really wrote any.

Beefing up the default applet shell would be a fine thing for Apple to do though.  There's all kinds of scripting support that could be implemented cleanly there, like most of the script additions that we've been discussing here.

Jon
 _______________________________________________
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

  • Follow-Ups:
    • Re: blocking user actions
      • From: Chris Page <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>)

  • Prev by Date: Re: on blocking target applications' GUIs (was Re: Tell Blocks Considered Harmful)
  • 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: blocking user actions
  • Index(es):
    • Date
    • Thread