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!)