Find Apple Identifier of AppleScript Application

2.1k views Asked by At

I recently created an application by writing an AppleScript and saving it as an application. I then wanted to use DashCode to create a Dashboard Widget that would have a button to launch the application - just for fun.

But, the DashCode example code instructed me to find the "Application Identifier" to use to launch the application. I don't have any clue how to find the application identifier, however. Does anyone know a way to find it?

Thanks in advance!

1

There are 1 answers

1
Jim Bob Pipes On

The application identifier of an app "looks something like an Internet domain name in reverse, such as 'com.apple.textedit'." → reference

If you used Xcode to create your Applescript application you can set the Application Bundle Identifier as part of the application setup wizard or in the Application Target properties. If you used the Applescript Editor to write your script and save it as an application your bundle won't have an identifier but you can add one.

CTRL-Click on your application bundle and click Show Package Contents. Click on the Contents folder and then open the Info.plist file. This file specifies properties of your application in XML format. If you have Xcode installed it will open the file in the Plist editor making it a little more friendly to edit. What you want to do is add the CFBundleIdentifier key and your Application Identifier as the value. For example:

<key>CFBundleIdentifier</key>
<string>com.depot6.showworkingdrive</string>

Add it near the CFBundleName key/value pair under the element. Saving the modified Info.plist will allow you to target that application in your Dashcode widget.