• 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: API to determine a list of installed scriptable applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: API to determine a list of installed scriptable applications


  • Subject: Re: API to determine a list of installed scriptable applications
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 03 Apr 2011 14:47:45 +0100

On 3 Apr 2011, at 13:35, Peter Lübke wrote:

>
> Am 02.04.2011 um 11:56 schrieb email@hidden:
>
>> Is there an API to determine a list of installed scriptable applications?
>>
>> Such a list is displayed by the AppleScript Editor menu item Open Dictionary...
>>
>> Application bundles can be queried for using MDQuery and the scriptability of a given application can be be determined.
>> I don't think that ASE uses this approach as its existence long predates Spotlight etc.
>>
>> Also the ASE list includes items that have not been previously launched.
>>
>> Regards
>>
>> Jonathan Mitchell
>
> The list of the applications shown in AppleScript Editor menu item Open Dictionary... is stored in a plist file:
> home/Library/Preferences/com.apple.ScriptEditor2.plist (key: "LibraryApplications").
>
Interesting suggestion but..
On OS X 10.6.6 the LibraryApplications key is absent.
I would also prefer a more direct method than querying another app's preferences file.


> I think the reason you see items that haven't been previously launched is that these are Apple Applications / Additions that might already be in the plist when the OS is installed.
> Maybe you can use these as a starting point and add items to your own .plist file as you or your users found more scriptable apps?
>
> Just out of interest: how do you determine scriptability of an application without launching it?
>
(* applescript *)
tell the application "Finder"

	set myApp to the application file "Mail" in the folder "Applications" in the startup disk
	if has scripting terminology of myApp then
		return "scriptable "
	else
		return "not scriptable "
	end if
end tell

or one can query the application bundle for the .scriptsuite or .sdef resource files.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >API to determine a list of installed scriptable applications (From: "email@hidden" <email@hidden>)
 >Re: API to determine a list of installed scriptable applications (From: Peter Lübke <email@hidden>)

  • Prev by Date: Re: API to determine a list of installed scriptable applications
  • Next by Date: Re: Book for expert programmer about cocoa and Objective-C
  • Previous by thread: Re: API to determine a list of installed scriptable applications
  • Next by thread: An "Open With..." submenu...
  • Index(es):
    • Date
    • Thread