Where is Something.app?

I’ve written a small little applescript which prompts for the user to select an application when it is run. The purpose of this is solely to get the name of the application as text. Nowhere in the code is there a “tell Some_application …” call.

Nonetheless, if the script is run on one machine, and then later run on another machine, I get a promt at startup asking me where whatever application was last selected is. This seems silly. It is meant to be application/system independent, and the application selected LAST time has no bearing whatsoever on any given run. Is there a way to avoid this from happening?

The reason is that the script will be used on many machines in a cluster by numerous users, and some of the machines have different software installed. Thanks!


Values of variables are saved when you quit your scripts unless you declare them as local. Here’s an example:

local the_app

set the_app to choose application

To test this make a simple applescript application like:

display dialog “hi”

Then run the first script aplication and select the second script app. Now trash the second script app and run the first. It will not ask you where the second app is.



I forgot to give credit to a person who goes by the name of Hiroto for this info. I try to credit people when I can remember where the info came from. Hiroto’s posted this info at Apple’s AppleScript bb section.

It was the first time I heard of this and that’s why I’m giving credit.


That explains it all. Thanks!