Re: API to determine a list of installed scriptable applications
On 3 Apr 2011, at 13:35, Peter Lübke wrote: > > Am 02.04.2011 um 11:56 schrieb jonat...@mugginsoft.com: > >> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: API to determine a list of installed scriptable applications
Am 02.04.2011 um 11:56 schrieb jonat...@mugginsoft.com: 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"). 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? Cheers, Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
API to determine a list of installed scriptable applications
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 Developer Mugginsoft LLP http://www.mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com