• 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: Script Holds While Mouse Down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Holds While Mouse Down


  • Subject: Re: Script Holds While Mouse Down
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 19 Nov 2012 13:59:54 +1100

On 19/11/2012, at 4:00 AM, Luther Fuller <email@hidden> wrote:

> This does not seem to me to be a bug. Is it a feature?

It's neither.

My guess...

The standard AppleScript app presumably does its work on the main thread. The main thread is also responsible for responding to mouse and keyboard events. If an application ties up the main thread and the number of pending events start to back up, the result is the spinning cursor. One way to avoid this is to regularly deal with any pending events as they occur.

So your script app presumably deals with a command, then checks to see if there are any other pending events like mouse clicks that need to be dealt with. But because you're holding the mouse button down, you keep generating them so the application can't get back to its other work until you let go.

ASE and other editors are multi-threaded and thus avoid the problem. This also means they run scripts faster.


--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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: 
 >Script Holds While Mouse Down (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Display list
  • Next by Date: Re: widthNameColumn broke???
  • Previous by thread: Script Holds While Mouse Down
  • Next by thread: widthNameColumn broke???
  • Index(es):
    • Date
    • Thread