Re: Replacement for "Akua Sweets" in OSX
Re: Replacement for "Akua Sweets" in OSX
- Subject: Re: Replacement for "Akua Sweets" in OSX
- From: Gary Lists <email@hidden>
- Date: Fri, 22 Nov 2002 01:46:09 -0500
On 11/21/02 4:36 PM, Brennan wrote:
>
On Thu, 21 Nov 2002 21:16:35 +0100, Barbara Mueller <email@hidden>
>
wrote:
>
>
> In system 9.2.2 I was using the scripting addtions "Akua Sweets"
>
> for the following commands:
>
>
>
> tell application "Finder"
>
> set theProg to path to creator "CARO"
>
> open theProg
>
> end tell
>
>
This should do it:
>
>
tell application "Finder"
>
open application file id "CARO"
>
end tell
>
>
Brennan
Barbara, you can do that without Akua anyway...
A slightly shorter version of Brennan's (hey, save the keystrokes when you
can ;) is...
tell application "Finder" to open application file id "CARO"
But to get an actual addressable name for an application whose name might
change, you can:
-- replace << and >> with real deal in next line
if <<class CARO>> is not in (creator type of every process) then
set theAppliName to name of (open application file id "CARO")
set activated to true -- finder opened the app, so it's active
else
set theAppliName to name of first process whose creator type is "CARO"
set activated to false -- it's already open, but is not active
end if
Now you can 'tell application theAppliName' things.
The first method allows opening the application without knowing its exact
name, but still doesn't provide you a way to address that application
directly. The second way actually gets you a useable name.
HTH,
Gary
--
Do not reply via email. Incoming replies are auto-deleted.
Please post directly to the list or newsgroup. Thank you!
Really need direct? Rot me at:
email@hidden
Lbhe fhowrpg zhfg ortva "abgwhax:" (ab dhbgrf)
Avpr gb zrrg lbh! Qba'g fcnz zr.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.