I am an aero engineer who does a lot of coding around physics-based simulations, but at a admittedly very primitive level (think Fortran, although we are now out of the Stone Age and writing in Python and Julia); mostly out of necessity since our programs need to be specific enough that farming out the work really does not work at all. So Applescript is simple and great for me, although I am a newbie at it.
I was messing around with trying to write some Applescripts and wanted to create a shorter reference to an application. So I started with the following just to trigger the “Where is [name]?” dialog box to appear and test if it could be done.
tell application "syn-test" to activate
So obviously, with that name not existing, Script Editor shows me a dialog box to select an application, and thereafter the reference is transformed by Script Editor to the actual name of the application the instant I hit run. Now, based on things I’ve read, I thought that this reference isn’t stored anywhere but only persists within the compiled script and disappears after I’ve deleted it. Well, I did delete that test script and found that somehow, this reference is still resolving to the application I referenced it to on every subsequent script I then use it on.
I suppose I could just leave it, but it’s maddening that I don’t understand how this works. I also don’t like unnecessary references sticking around, so I’m trying to figure out if there is a way to unassign this reference? How is it even persisting? Clearly, this reference is being stored somewhere permanently, but I have no clue or in what form.
I had a really hard time finding any documentation about this feature, but was able to find this Apple documentation from OS 9 days:
References to Local Applications
I also found this snippet from an O’Reilly guide:
External Referents Needed at Compile Time
Unfortunately, none of these tell me anything about how these references are stored or how I might manipulate them.