• 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: Getting Script Editor to save a new document without closing it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Script Editor to save a new document without closing it?


  • Subject: Re: Getting Script Editor to save a new document without closing it?
  • From: Adam Bell <email@hidden>
  • Date: Tue, 14 Nov 2006 09:46:50 -0400

Title: Re: Getting Script Editor to save a new document without c
Works in this form as well:

on newScriptEditorDoc(scriptText)
       tell application "Script Editor"
                activate
                set D to make new document with properties {text:scriptText}
            compile D
       end tell
end newScriptEditorDoc
newScriptEditorDoc("tell application \"System Preferences\" to activate")

At 7:57 PM -0500 11/13/06, Cameron Hayne wrote:
On 13-Nov-06, at 3:06 PM, Brennan Young wrote:
I've also had difficulty
1) setting the text of a script in script editor

Try this:

on newScriptEditorDoc(scriptText)
    tell application "Script Editor"
        activate
        make new document
        set the text of the front document to (scriptText)
    end tell
end newScriptEditorDoc


--
Cameron Hayne
email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >Getting Script Editor to save a new document without closing it? (From: Brennan Young <email@hidden>)
 >Re: Getting Script Editor to save a new document without closing it? (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: FileMaker 8 "create new record" again....
  • Next by Date: Re: Getting Script Editor to save a new document without closing it?
  • Previous by thread: Re: Getting Script Editor to save a new document without closing it?
  • Next by thread: Re: Getting Script Editor to save a new document without closing it?
  • Index(es):
    • Date
    • Thread