AppleScript fails in Automator - Permissions error
AppleScript fails in Automator - Permissions error
- Subject: AppleScript fails in Automator - Permissions error
- From: Lists <email@hidden>
- Date: Sat, 06 Jul 2013 13:13:41 -0700
The following simple script for naming and saving a currently open TextEdit document works from AppleScript but fails under Automator.
set file_name to "Gotcha " set c_date to (do shell script "date +%Y%m%d_%H.%M.%S") set file_path to (path to desktop as string) & file_name & c_date & ".rtfd" tell application "TextEdit" close document 1 saving in file file_path end tell
Is it possible to do this with Automator? I have a work around, but it is so ugly I'm embarrassed to reveal it. The last step of the Automator workflow sends a keystroke command via AppleScript to FastScripts which performs the save :-\ delay 2 tell application "Finder" to activate tell application "System Events" tell application process "Finder" keystroke "s" using {control down, command down} end tell end tell
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden