Baffled about Folder Actions

Hi,

For the first time, I’m trying to create folder actions on OSX (I’m on OSX10.2.8 ). I’ve went through the Folder Actions FAQ’s here on MacScripter to get the gist of what I need to do, but I’m having a very confusing time trying to get some simple scripts to work.

I started with a simple script (theScript) like this …

on adding folder items to this_folder after receiving added_items
	tell application "Finder" to display dialog "OK!"
end adding folder items to

…and tried attaching it to a folder (theFolder) through System Events…

tell application "System Events" to attach action to theFolder using theScript

…and then verifying that it was actually attached…

tell application "System Events"
	name of every script of folder action theFolder
end tell

…but adding something to the folder doesn’t trigger the script.

Here’s the weird part. If I attach one of the sample scripts that came with the system, like “add - new item alert.scpt,” it works fine, but, if I copy the code from the sample script, paste it into a new script, and save as something new, it doesn’t work. I tried saving as a compiled script, and application. Also, I tried duplicating the sample script in the finder (creating “add - new item alert copy.scpt”), and attaching the duplicate. That doesn’t work. The only scripts I get to work are the samples, if used as-is.

I’m on OSX 10.2.8, with AppleScript v1.9.1, and did enable folder actions prior to attempting this. Sorry for all my italics. :oops:

Thanks,

One thing to check, which caught me out at first: Folder Action scripts have to be in a folder called “Folder Action Scripts” in your “Scripts” folder. This doesn’t show up in the Script menu, but is the only place these things seem to work. If there isn’t a folder of that name in your local “Scripts” folder, it’s OK just to go ahead and create one.

That was it. Thanks. 8)

I’m new to apple script & would really appreciate some (basic) help !! I want to create a Folder Action script for “Remove embedded colour profile” (which appears in the coloursync script folder, BUT it doesn’t appear in the Folder Action Scripts list - so… how do I add the “Remove embedded colour profile” script to the list of script options that are found in the Folder Action Scripts ? Can this be done ?