Re: Forcing 'tell app' to use carbon, rather than classic app/Erratum
Re: Forcing 'tell app' to use carbon, rather than classic app/Erratum
- Subject: Re: Forcing 'tell app' to use carbon, rather than classic app/Erratum
- From: Philippe GRUCHET <email@hidden>
- Date: Wed, 8 Jan 2003 17:42:43 +0100
From: cassj <email@hidden>
I wrote this little script that will return the 'kind' attribute of
any file you choose:
tell application "Finder"
activate
set filechosen to choose file
set filekind to kind of filechosen
display dialog "filekind: " & filekind
end tell
I'm not saying this is THE solution to Bill's situation, but it seems
like at least one way to distinguish between a "Classic Application"
and an "Application".
Absolutely!
Moreover, 'info for' (as I suggested) doesn't send back the kind
attribute of an item.
So, my previous example should have been:
tell application "Finder" to kind of application file id "emal" --
(Mail)
-- Result for a Carbon or Cocoa app: "Application"
tell application "Finder" to kind of application file id "ogle" --
(PictureViewer)
-- Result for a PPC app: "Application Classic"
From: Emmanuel <email@hidden>
I don't know if this will be of any help, but in case you don't know,
suppose your script has sorted out what the full path of the wanted
application is, then I think that you can use the full path (instead
of the app's name) as the parameter of "tell application".
So, the examples become:
tell application "Finder" to kind of (application file id "emal" as
alias) --> return full path and "Application"
tell application "Finder" to kind of (application file id "ogle" as
alias) --> return full path and "Application Classic"
We can always get some more information via the 'info for' instruction:
tell application "Finder" to info for (application file id "emal" as
alias)
Best regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.