I am trying to do something pretty straight forward. This worked in my old Mac but now on Monterey in the new iMac the Applescript throws an error.
I am trying to simply:
1. Move a file that has a specific tag into a folder.
2. This folder has renaming rules already -> so once the file gets there, it gets renames based on those rule
3. The Applescript prompts a pop up that asks me to rename the file according to a specific naming convention (I need to define in this case manually part of the file name, this is the reason for the rename prompt)
Here is what I have in the Applescript
- Code: Select all
delay 3
tell application "Finder" to activate
tell application "Finder"
set currentName to name of theFile
set name of theFile to text returned of (display dialog "Rename File:" default answer currentName)
end tell
This is the error I get
error "The variable currentFile is not defined." number -2753 from "currentFile"
Here is my Hazel ruleset
https://drive.google.com/file/d/1oqO8Y28XjEvWHjoTYvxzB64GEwf266np/view?usp=sharing
I've played around with the "delay" to give enough time for the other rules to run first, but makes no difference.
What am I doing wrong?
Thanks!