• 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
Smartest way to write a queuer script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Smartest way to write a queuer script


  • Subject: Smartest way to write a queuer script
  • From: Bert Groeneveld <email@hidden>
  • Date: Fri, 13 Nov 2009 14:33:53 +0100

Hello, I was wondering if this is the smartest way to write a "queuer" script? It's a stay open script that queus several slave stay open scripts and runs a specific handler fron the slave scripts.
Something inside tells me this can be done smarter or....? Could I for example replace the timeout statement with a try statement? I'm just a bit unsure about it. The way I show works, but I need some confirmation, I guess.

on run
idle
end run


on idle
with timeout of (120 * 60) seconds
tell application "Script1" -- first stay open script
name_of_the_handler() -- watches a hotfolder and if files found it starts.
end tell
end timeout


with timeout of (120 * 60) seconds
tell application "Script2" -- another stay open script
name_of_the_handler() -- watches a hotfolder and if files found it starts.
end tell
end timeout


return 30
end idle

Bert.
 _______________________________________________
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

  • Prev by Date: Stopwatch
  • Next by Date: Opening a folder is AS vrs double clicking
  • Previous by thread: Stopwatch
  • Next by thread: Opening a folder is AS vrs double clicking
  • Index(es):
    • Date
    • Thread