• 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: Folder Actions Unreliable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Actions Unreliable?


  • Subject: Re: Folder Actions Unreliable?
  • From: Tim Mansour <email@hidden>
  • Date: Fri, 28 May 2010 14:34:09 +1000


On 28 May 2010 14:07, Steve Thompson <email@hidden> wrote:
> Any examples on implementing such a thing? AS timeouts have always been an
> issue for me.

This was the basic structure of the stay-open file router:

property idle_delay : 5 -- seconds to delay between idle runs of script


on idle

RouteFiles()

return idle_delay -- in seconds

end idle


on run

RouteFiles()

end run


on quit

display alert "Quit File Router?" message "WARNING! If you quit file processing will cease. Relaunching will resume processing of any pending files." buttons {"Stay Open", "Really Quit"} default button 1 as critical

if the button returned of the result is "Really Quit" then continue quit

end quit


Obviously it's the RouteFiles() handler that does the slog-work. As for timeouts: depending on the applications you're controlling you'll just have to make sure you allow enough time for individual actions to complete. You may have more than one stay-open script handling different parts of the workflow, too (in my experience Folder Actions were particularly sluggish when there was more than one folder involved).

--
Tim Mansour <email@hidden>
Neologica Print & Promotions ABN 63 904 335 408
Certified FileMaker 10 Developer
PO Box K1163 : Haymarket NSW 1240
Mobile 0405 500 846 : Melbourne in-dial 03 9012 7441

 _______________________________________________
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: 
 >Folder Actions Unreliable? (From: Steve Thompson <email@hidden>)
 >Re: Folder Actions Unreliable? (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: Folder Actions Unreliable?
  • Next by Date: Re: Folder Actions Unreliable?
  • Previous by thread: Re: Folder Actions Unreliable?
  • Next by thread: Re: Folder Actions Unreliable?
  • Index(es):
    • Date
    • Thread