• 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: Sun Real <email@hidden>
  • Date: Wed, 25 Apr 2001 11:23:31 +1000

Harald E Brandt's message of 25/4/01 7:44 AM contained:

>+--> Jeffrey W Baumann wrote 01-04-24:
>>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


>...thought 'run script' would
>be just what I wanted, namely to run a single procedure I have stored in a
>file.
>
>Obviously I don't understand it. How can I achieve the same result (as
>'load script' plus a tell) with 'run script'? What do you mean by saying
>that there's nothing in its run handler?

What Jeff means is that your test script only has a sub-routine handler,
but you need a run handler with parameters.


>Why aren't the numbers 2 and 3
>passed to the run handler 'test'?

It's not a run handler.


>How else are parameters supposed to be
>handed to a script?

on run {p1, p2}
test(p1, p2)
end


Cheers,

Richard Morton
-- Great Lies of the Music Business: "The booking is definite"


  • Follow-Ups:
    • Re: Run script with parameters?
      • From: Harald E Brandt <email@hidden>
    • Re: Run script with parameters?
      • From: Ted Wood <email@hidden>
  • Prev by Date: Re: Reading nested lists from a preference file
  • Next by Date: Re: Reading nested lists from a preference file--thanks
  • Previous by thread: Re: Run script with parameters?
  • Next by thread: Re: Run script with parameters?
  • Index(es):
    • Date
    • Thread