I’ve recently moved to Big Sur, and am working through my long list of Applescripts, recompiling and making the (usually few) changes necessary for this new environment.
There’s a handful which comprise an application and one or more compiled script files (.scpt) and I’m having trouble getting them to run correctly on Finder double-click. I use [format]path to me[/format] at the start, to figure out the path to the script files so I can load them, but when double-clicked in the Finder I get a string like this:[format]94E5DF40-13F9-48AC-9DDE197EA399:d:myapp.app[/format]
What’s even weirder is that the string actually changes every now and then! Naturally, what I expect is [format]MyDisk:Users:SkiAddict1:Documents:Code:Applescripts:myapp.app[/format] and that’s what I get if I run from within the Script Editor.
It’s clearly got something to do with compiled scripts in an app bundle, since a simple app like the following:
set str to (path to me) display dialog (str as text)
performs as expected.
Does anyone know what’s going on here? I’d be grateful for some ideas as to how to solve this!