I’ve looked every where but couldn’t find what I am looking for.
What I’m trying to do is:
on adding folder items to theWatchedFolder after receiving these_items
-- lock the watchfolder (so that nothing can interfere my script)
--do my script
--unlock the watchfolder
end adding folder items to
Assuming you have developer tools installed this will work (well it will lock/unlock the folder anyways :D)
on adding folder items to theWatchedFolder after receiving these_items
do shell script "/usr/bin/SetFile -a L " & (quoted form of POSIX path of theWatchedFolder)
-- do your script
do shell script "/usr/bin/SetFile -a l " & (quoted form of POSIX path of theWatchedFolder)
end adding folder items to