• 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
Folder action script to set property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder action script to set property


  • Subject: Folder action script to set property
  • From: Simon Forster <email@hidden>
  • Date: Wed, 8 Jun 2005 15:03:25 +0100

Can a folder action script set a global property so that it's remembered when the script is run?


property watchedFolder : ""

on adding folder items to thisWatchedFolder after receiving theseWatchedFolderItems
global watchedFolder
set watchedFolder to (thisWatchedFolder as string)
tell application (path to me as string) to run
end adding folder items to


on run()
    global watchedFolder
    watchedFolder -->empty string
end

on idle()
    --stuff which needs to keep on happening
end


At the moment I'm having to get the folder action to write out to a file and then load it in the run handler - which seems kinda pointless.


(Beginning to wish I'd just stuck with good old run scripts with idle handlers - forget folder actions!)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Folder action script to set property
      • From: Yvan KOENIG <email@hidden>
    • Re: Folder action script to set property
      • From: Mr Tea <email@hidden>
  • Prev by Date: Re: Binary math operations (and, or, etc.)
  • Next by Date: OT: Re: Shit - it's all true
  • Previous by thread: Re: Folder action in download folder...
  • Next by thread: Re: Folder action script to set property
  • Index(es):
    • Date
    • Thread