• 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: Identifying app by creator code??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying app by creator code??


  • Subject: Re: Identifying app by creator code??
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 3 Jan 2001 17:15:11 -0800

On 1/3/01 4:38 PM, Chris Nebel <email@hidden> wrote

>METHOD 3: (the "using terms from" method): AppleScript 1.4 (in Mac OS 9)
>introduced a new block called "using terms from" that was designed to
>solve precisely this problem. It's similar to the double-tell method, but
>is guaranteed to never ask you for the application at run time. It looks
>like this:
>
> -- compute appOE somehow
> tell application appOE
> using terms from application "Outlook Express"
> -- OE-specific commands here
> end
> end
>
>"Tell" does two things: at compile time, it tells AppleScript where to get
>terminology, and at run time, it tells it where to send commands. "Using
>terms from" only does the first -- it does nothing whatsoever at run time.
>The "tell", therefore, will direct the commands to appOE, wherever it
>turns out to be, while the "using terms from" will fetch terminology from
>your local copy of Outlook Express when you compile the script, but after
>that it gets out of the way.

Hmm, you're using the using terms from inside the tell wrapper. Here's a
fragment I'm using that does the reverse of that.

using terms from application "Macjordomo"
tell theapp
Subscribe List listname User theAddress Name theName
end tell
end using terms from

"theapp" is defined as a property, and is a reference to a copy of
Macjordomo running on another machine; the first time the script is run,
the user is asked to choose the app, using "choose application".

I wrote it this way because otherwise I had to have the server mounted
each time I compiled the script. This way, so long as I have a copy of
Macjordomo on the development machine, that doesn't happen.

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Identifying app by creator code??
      • From: Chris Nebel <email@hidden>
  • Prev by Date: Re: open transport database scripting
  • Next by Date: Re: Identifying app by creator code??
  • Previous by thread: Re: Identifying app by creator code??
  • Next by thread: Re: Identifying app by creator code??
  • Index(es):
    • Date
    • Thread