• 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
Re: AppleScript fails in Automator - Permissions error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript fails in Automator - Permissions error


  • Subject: Re: AppleScript fails in Automator - Permissions error
  • From: Alex Zavatone <email@hidden>
  • Date: Sat, 06 Jul 2013 23:52:45 -0400

Sorry.  Resend.  

Sounds like you don't have permission to write the file to the desktop.

On Jul 6, 2013, at 11:49 PM, Kaydell Leavitt wrote:

Hi email@hidden,

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

I tried this script in both "AppleScript Editor.app" and in a simple Automator workflow, where the "Run AppleScript" action was the only action and it worked for me.

I'm running Mountain Lion (10.8.4) as an administrator.

You got a "Permissions error"?  What else can you tell us about this error?

-- Kaydell
email@hidden
http://learnbymac.com



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
References: 
 >AppleScript fails in Automator - Permissions error (From: Lists <email@hidden>)
 >Re: AppleScript fails in Automator - Permissions error (From: Kaydell Leavitt <email@hidden>)

  • Prev by Date: Re: AppleScript fails in Automator - Permissions error
  • Next by Date: Re: AppleScript fails in Automator - Permissions error
  • Previous by thread: Re: AppleScript fails in Automator - Permissions error
  • Next by thread: Re: AppleScript fails in Automator - Permissions error
  • Index(es):
    • Date
    • Thread