Re: What the "tell" is going on?
Re: What the "tell" is going on?
- Subject: Re: What the "tell" is going on?
- From: "Bob.Kalbaugh" <email@hidden>
- Date: Fri, 22 Jun 2001 22:53:41 -0500
on 6/22/01 9:13 AM, Gary B. Little at email@hidden wrote:
>
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.
Does your script reference Fetch as "Fetch 3.0.3"? I've come to find out
that you can do it another way.
>
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 don't think that "Fetch" will look into the desktop database...
But the "Finder" will
Try this:
(* the following references Fetch, if it exists, whether
it is running or not and returns an error if it doesn't,
so good idea to set some traps ;-) *)
tell application "Finder"
try
set appToFind to application file id "FTCh" as string
on error -- usually -1728 (can't get reference)
--do something here (dialog routine is helpful)
return
end try
end tell
--if no errors then activate
tell application appToFind
activate
end tell
(* Works with most applications under Mac OS 8.5
not sure about earlier or later versions.
Just replace "FTCh" with something else.*)
have fun,
_blkbird