Re: passing a parameter to the run handler
Re: passing a parameter to the run handler
- Subject: Re: passing a parameter to the run handler
- From: Matt Neuburg <email@hidden>
- Date: Sat, 30 Jul 2005 18:35:31 -0700
On Tue, 26 Jul 2005 08:25:27 -0700, John Rethorst <email@hidden>
said:
>
>On Jul 25, 2005, at 11:27 PM, applescript-users-
>email@hidden wrote:
>
>> On 26 Jul 2005, at 12:57 PM, John Rethorst wrote:
>>
>>> An application I use can send a run event to another application
>>> and pass a parameter, in this case a URL. I'd like to direct this
>>> run event to an applet, e.g.:
>>>
>>> on run (theURL)
>>> -- process theURL
>>> end run
>>>
>>> Matt Neuberg's book discusses passing a parameter to a script
>>> object, but not to the parent script.
At the time there was a paucity of ways. Now there are several. Let this be
an applet called displayWhatYouSay.app:
on run {what}
tell application "Finder"
activate
display dialog what
end tell
end run
Then this works in the Terminal:
% osascript displayWhatYouSay.app howdy
There is an NSAppleScript command in Cocoa that's parallel. I'm confused,
though, because you say the application you use can *already* do it, so it
isn't entirely clear what the problem is. Can you be less vague about what
is "the application" and how you want to do this? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden