• 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: choose application list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: choose application list


  • Subject: Re: choose application list
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 18 Sep 2003 13:14:44 -0700

On Thursday, September 18, 2003, at 12:38 PM, Robert Poland wrote:

tell application "Finder" to get creator type of process (choose application)
-->

Brings up a list of every application that was ever on the computer, whether they still exist or not.

It brings up a list of only those applications still on the computer on my machine.

Selecting one of them gets an error "Finder got an error: A descriptor type mismatch occurred.". this occurs with applications that are running or not running.

The reason for this can be explained by the following:

set foo to choose application
tell application "Finder" to get creator type of process foo

The results window shows the following:

tell current application
choose application
application "Mail"
end tell
tell application "Finder"
get creator type of process (application "Mail")
"Finder got an error: A descriptor type mismatch occurred."

This works:

set foo to choose application
tell application "Finder" to get creator type of process (name of foo)

The result window shows this:

tell current application
choose application
application "Mail"
end tell
tell application "Mail"
get name
"Mail"
end tell
tell application "Finder"
get creator type of process "Mail"
end tell
tell application "System Events"
get creator type of process "Mail"
"emal"
end tell

So, one liner:

tell application "System Events" to get creator type of process (name of (choose application))

has a result window showing:

tell application "System Events"
choose application
application "Mail"
end tell
tell application "Mail"
get name
"Mail"
end tell
tell application "System Events"
get creator type of process "Mail"
"emal"
end tell

If you choose an application that's not running, the results window shows the following:

tell application "System Events"
choose application
application "Acrobat Reader 5.0"
end tell
tell application "Acrobat Reader 5.0"
get name
"Acrobat Reader 5.0 got an error: Can't get name."

--
Peter pull at St. Taffy's tonight! (Or is it the other way around?)
_______________________________________________
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.

References: 
 >choose application list (From: Robert Poland <email@hidden>)

  • Prev by Date: choose application list
  • Next by Date: Re: Finding and deleting specific extensions
  • Previous by thread: choose application list
  • Next by thread: Re: choose application list
  • Index(es):
    • Date
    • Thread