File --> Alias --> AppleScript...what's 'theFile'...?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I notice that once I add an action to create an alias, that any subsequent actions in the rule (like rename, sort, tags etc) are applied to the alias, not the original file. This is great and exactly what I want. My question is...if I have an action to run an AppleScript which occurs AFTER those actions which affect the alias, what "file" is Hazel passing into the Applescript (as 'theFile')? Is it the original file or the alias that was subsequently created? If it's the alias, I assume I just need to re-sequence my actions to have the AppleScript run before the alias is created? Is that right?
Lachlan Williams
 
Posts: 19
Joined: Fri Jun 11, 2021 4:06 am

The alias would be sent in so yes, if you want the script to run on the original, you want to either put it earlier in the sequence or use a separate rule to match the file again. You would need to use the "Continue" action to allow the file to match multiple rules.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support