• 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 to write script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript to write script


  • Subject: AppleScript to write script
  • From: Steve Suranie <email@hidden>
  • Date: Thu, 20 Apr 2006 14:17:28 -0400
  • Thread-topic: AppleScript to write script

I'm trying to script Script Editor to write a series of folder actions and
attach them to folders. I can write the content of the script but when I go
to do the Save As I get an NSInternalScriptError

set FAPath to "Macintosh HD:Library:Scripts:Folder Actions Scripts:"

if not (exists FAPath) then
    display dialog "WTF"
else
    tell application "Script Editor"
        make new document
        tell front document
            set contents to "on adding folder items to this_folder after
receiving these_items" & return & "display dialog \"Items added\"" & return
& "end adding folder items to"
            compile
            try
                save as script in FAPath
            on error errMsg
                display dialog errMsg
            end try
        end tell
    end tell
end if

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScript to write script
      • From: Takaaki Naganoya <email@hidden>
    • Re: AppleScript to write script
      • From: "J. Stewart" <email@hidden>
References: 
 >Re: logout hook and AppleScripts (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Graphic use in AppleScript Studio
  • Next by Date: Re: Graphic use in AppleScript Studio
  • Previous by thread: Re: logout hook and AppleScripts
  • Next by thread: Re: AppleScript to write script
  • Index(es):
    • Date
    • Thread