Re: Run script with parameters?
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