Page 1 of 1

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

PostPosted: Sun Nov 03, 2024 7:22 am
by Lachlan Williams
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?

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

PostPosted: Mon Nov 04, 2024 11:03 am
by Mr_Noodle
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.