• 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: What the "tell" is going on?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What the "tell" is going on?


  • Subject: Re: What the "tell" is going on?
  • From: Bill Peters <email@hidden>
  • Date: Fri, 22 Jun 2001 11:56:39 -0600

At 7:13 AM -0700 6/22/2001, Gary B. Little wrote:
>Does anyone know the algorithm the tell statement uses to locate an
>application at run time?
>
>Here's my problem. I've got a Fetch-related script that was compiled when
>the old Fetch 3.0.3 was one my system. When I upgraded to Fetch 4 and
>removed Fetch 3.0.3, the script now asks me "Where is Fetch?" even though
>the creator type for Fetch has not changed. Strangely, it even asks me when
>Fetch 4 is already running.
>
>Although I can easily recompile the script on my own system, I'd like the
>script to work properly regardless of the version of Fetch that someone who
>may run my script may have on their system.
>
>How does the tell statement work? Why can't it just look in to the desktop
>database to determine where the application is located. I've got a Launch
>Application osax that does just that and it works just fine.
>
>Gary


I ran into the same problem in an application I was scripting. I don't have
a solution when some version of the application is not already running, but
this will work when it is:

tell application "Finder"
-- beware of the chevrons around "class psn "
set theProcess to (first process whose creator type is "FTCh") as +class
psn ;
end tell

using terms from application "Fetch 3.0.3"
tell theProcess
-- do something cool
end tell
end using terms from


Good Luck,
Bill Peters


References: 
 >What the "tell" is going on? (From: "Gary B. Little" <email@hidden>)

  • Prev by Date: Re: The Need for Speed: Finding Entourage contacts by display name or nickname
  • Next by Date: Re: Compile a string?
  • Previous by thread: What the "tell" is going on?
  • Next by thread: Re: What the "tell" is going on?
  • Index(es):
    • Date
    • Thread