- Joined
- Jun 26, 2015
- Messages
- 2
- Reaction score
- 0
I had a perfectly good automator script which has been working for a year or two, then it all of a sudden no longer works.
The Automator script created a service so when I right-click on a file name, it copies it into a Backup folder off of whatever the current folder is, then renames it to include the date. This script was on my right-click context menu, but now it's gone.
I know... there's an automator forum. But the automator script contains a step which runs AppleScript, so I thought this was a good place to start. This script now returns an error when I try to run it:
When I run this code, I get this error: "Can’t make «class ctnr» of item 1 into type alias."
Item 1 of input was the file I right-clicked on, so I guess container is the folder.
Can anybody suggest a better way to code this applescript part so it doesn't return a syntax error?
Thanks...
The Automator script created a service so when I right-click on a file name, it copies it into a Backup folder off of whatever the current folder is, then renames it to include the date. This script was on my right-click context menu, but now it's gone.
I know... there's an automator forum. But the automator script contains a step which runs AppleScript, so I thought this was a good place to start. This script now returns an error when I try to run it:
Code:
on run {input, parameters}
tell application "Finder"
set output to (container of item 1 of input) as alias
end tell
return output
end run
When I run this code, I get this error: "Can’t make «class ctnr» of item 1 into type alias."
Item 1 of input was the file I right-clicked on, so I guess container is the folder.
Can anybody suggest a better way to code this applescript part so it doesn't return a syntax error?
Thanks...