• 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: passing a parameter to the run handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: what happened to Mail's scripts menu?
  • Next by Date: Re: unixy paths to alias
  • Previous by thread: Re: passing a parameter to the run handler
  • Next by thread: Re: set myList to myList & ...(Applescript-users Digest, Vol 2, Issue 489)
  • Index(es):
    • Date
    • Thread