• 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: AppleScript and QuicKeys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and QuicKeys


  • Subject: Re: AppleScript and QuicKeys
  • From: Simon Forster <email@hidden>
  • Date: Tue, 21 May 2002 09:54:57 +0100

On Tuesday, May 21, 2002, at 08:45 AM, Curtis Michelson wrote:

The problem is, the QuicKeys macro takes about 4 seconds to do its thing and
by the time it finishes, my AppleScript has finished looping through the
cells in Excel and it's sitting back having a glass of Kool-Aid when ole
pokey QuicKeys reports back and says he's done.

So, my question is, how can I put the brakes on my AppleScript just long
enough to allow the QuicKeys macro to run and then to resume it's process
after the macro finishes?

I don't know QuickKeys at all. However, I'm guessing that QuickKeys is a single threaded process and that the first action in is the first one out? If so, wrap all your QuickKeys stuff in a with timeout statement (actually, not necessary if the process only takes a few seconds as the default timeout is 60 seconds) and then, after you've called your slow QuickKeys macro, make another, inconsequential QuickKeys call. Something like getting QuickKeys to return its version number. You should find that your AppleScript will pause until it gets the reply to your final request, at which point you know that QuickKeys has finished doing it's stuff.

FWIW, I was struggling with this with FileMaker Pro. I have some FileMaker scripted routines which take a variable amount of time to complete depending on how many records have changed in the past 24 hours. Sometimes it'd take 1 second, sometimes over an hour. By putting in place a tell block with a final, trivial AppleScript request to FMP, the AppleScript is forced to pause until the whole tell block has been completed. After that, we can go on to process the results.

HTH

Simon Forster
________________________________________________
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
<tel int="+44 70 9230 5244" uk="070 9230 5244">
<fax int="+44 70 9230 5247" uk="070 9230 5247">
<mailto:email@hidden>
________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >AppleScript and QuicKeys (From: Curtis Michelson <email@hidden>)

  • Prev by Date: AppleScript and QuicKeys
  • Next by Date: Re: Generating applescript files
  • Previous by thread: AppleScript and QuicKeys
  • Next by thread: application/script run by systems crontab causes pseudo-login
  • Index(es):
    • Date
    • Thread