• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScript fails in Automator - Permissions error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: AppleScript fails in Automator - Permissions error
      • From: "Manoah F. Adams" <email@hidden>
    • Re: AppleScript fails in Automator - Permissions error
      • From: Kaydell Leavitt <email@hidden>
  • Prev by Date: Re: saving displayed text on a web page as rtf
  • Next by Date: Re: AppleScript fails in Automator - Permissions error
  • Previous by thread: AUTO: Allyn Martin is out of office.
  • Next by thread: Re: AppleScript fails in Automator - Permissions error
  • Index(es):
    • Date
    • Thread