• 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: Snow Leopard osax security and 'run script' with parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snow Leopard osax security and 'run script' with parameters


  • Subject: Re: Snow Leopard osax security and 'run script' with parameters
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 1 Dec 2009 22:34:57 -0800

Scott,

I believe your parameters were being passed to the script, but the problem was something else.

After a little tweaking I could get your script to work, but I think there is a better way.

First, I wouldn't use a run handler, but would load your script as a script object.

See the ASLG for more info and there's lots threads on Script Objects in the archives.

HTH,

ES

-------
tell application "TextEdit"
	activate
	set docRef to document 1
end tell

set theScript to "on run {X}" & return & "tell app \"TextEdit\" to set text of document 1 to X" & return & "end"
run script theScript with parameters {"This is the simple test."}

set theScript to "on run {X,y}" & return & "tell app \"TextEdit\" to set text of document 1 to X" & return & "end"
tell application "TextEdit" to run script theScript with parameters {"This is the complex test.", docRef}

On Dec 1, 2009, at 9:52pm, Scott Babcock wrote:

>
>    tell application "TextEdit"
>        activate
>        set docRef to document 1
>    end tell
>
>    set theScript to "on run {X}" & return & "tell app \"TextEdit\" to set text of document 1 to X" & return & "end"
>    run script theScript with parameters {"This is the simple test."}
>
>    set theScript to "on run {Y, X}" & return & "tell Y to set its text to X" & return & "end"
>    tell application "TextEdit" to run script theScript with parameters {docRef, "This is the complex test."}

 _______________________________________________
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: 
 >Snow Leopard osax security and 'run script' with parameters (From: Scott Babcock <email@hidden>)

  • Prev by Date: Snow Leopard osax security and 'run script' with parameters
  • Next by Date: Re:Re: GUI scripting for installers which have root privilege
  • Previous by thread: Snow Leopard osax security and 'run script' with parameters
  • Next by thread: RE: Snow Leopard osax security and 'run script' with parameters
  • Index(es):
    • Date
    • Thread