• 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: Forcing 'tell app' to use carbon, rather than classic app/
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing 'tell app' to use carbon, rather than classic app/


  • Subject: Re: Forcing 'tell app' to use carbon, rather than classic app/
  • From: Bill Bug <email@hidden>
  • Date: Fri, 10 Jan 2003 14:42:23 -0500

Many thanks to all for the suggested solutions to this problem.

The one that worked best for me came from: Deivy Petrescu <email@hidden>

"Bill, a fast answer,
try appending ".app" at the end of the tell call. It might not work sometimes, but you can use AS to fix this. Also, most apps in X are in the Applications Folder. Last case Unix to do the dirty trick, try "locate" in do shell script."

Appending ".app" worked like a charm.

Many thanks to all.

Cheers,
Bill Bug

Subject: Re: Forcing 'tell app' to use carbon, rather than classic app/Erratum
To: email@hidden
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.
Bill Bug
Senior Analyst/Ontological Engineer

Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA 19129
215 991 8430 (ph)
_______________________________________________
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.

  • Prev by Date: Re: Reading input from a delimited source file
  • Next by Date: re: Command line text substitution
  • Previous by thread: Re: Problem with "open for access"
  • Next by thread: Changinge Applescript
  • Index(es):
    • Date
    • Thread