G’day scripters
I’m trying to get a script to stay open, and run every 10 seconds, but getting a ‘stack overflow’.
I don’t want to enter any terminal commands to run it periodically, as I don’t want it to be permanant.
I’ve tried this, but the shell script to quit & restart does not seem to recognize scripts.
I know the path is OK, with display dialog FolderActions
It’s the ‘killall’ that doesn’t seem to work. Only for .apps apparently. Or is there some special process I can kill?
Also tried an ‘idle’ command, but the script quits.
It’s called as a folder action script, so I can’t save as an App.
Any suggestions please?
Regards
Santa
tell application "Finder" set FolderActions to POSIX path of (path to Folder Action scripts folder from user domain) end tell try say 1 do shell script ("killall 'ftp Downloader'&&sleep 10&&open -a FolderActions&'ftp Downloader.scpt'") say 2 on error errMsg tell application "System Events" to display dialog errMsg giving up after 5 end try say 3 do shell script ("sleep 10") tell me to run
Errors with sh: ftp Downloader.scpt: command not found No matching processes belonging to you were found
on run say "start" my SetUpFile2() end run
on idle tell me to run return 10 end idle
|