• 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: Run script with parameters?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run script with parameters?


  • Subject: Re: Run script with parameters?
  • From: Jeffrey W Baumann <email@hidden>
  • Date: Tue, 24 Apr 2001 15:17:59 -0500

On Monday, April 23, 2001, at 04:34 PM, Harald E Brandt wrote:

I can't get this to work:

run script alias "HD:test" with parameters {2, 3}

With the script file called "test" being:

on test(a, b)
display dialog (a + b)
end test

Why doesn't this work?
Isn't run script supposed to be able to run such a thing?

I run AppleScript 1.6 on Mac OS 9.1 US

With hope for help,

Script file "test" may be "running," but there's nothing in its run handler. You want to call one of its handlers.

try this:

set testScript to load script file "HD:test" -- I personally dislike using "alias"
tell testScript
test(2,3)
end tell

Suggestion: Don't name the script the same as one of its handlers. That leads to confusion.

Jeff Baumann
email@hidden/email@hidden (dual citizenship!)
www.linkedresources.com


References: 
 >Run script with parameters? (From: Harald E Brandt <email@hidden>)

  • Prev by Date: Re: Non-modal information window showing progress?
  • Next by Date: Can Web Sharing be automated?
  • Previous by thread: Run script with parameters?
  • Next by thread: Re: Stopping a scipt in a Try Statment
  • Index(es):
    • Date
    • Thread