I have the line:
tell application "Finder" to set label index of anAlias to 6
That works perfectly well for a single anAlias, or in a repeat where anAlias comes from a list of aliases.
However, when the target is a folder, I ask for every alias of that folder, and then make it run recursively on that list of aliases.
For inexplicable reasons, in this case, I get the error (either in FastScripts or in Script Debugger):
System Events got an error: Can’t set «class labs» of alias "path_to-a-file" to 6.
The routine has no Tell blocks at all! Only single line Tell statements!
So why on earth does it suddenly send that message, intended for Finder, to System events?