Way to open script with missing app?

Is there any way to open a compiled script or applet when an app referred therein is missing?

Sometimes I have a need to inspect such a script when I’m away from the computer with the app, and I can’t get into it.

Yes, I know that normally one must have a TEXT version of such a script, but things don’t always work out that way and I’m frustrated. I’m asking whether there’s any way to circumvent the normal behavior, and I recognize that any changes made to the script would have to be save as TEXT.

Thanks!

Hi Shcmye,

How do you use your app in the script and how does your app become missing?

gl,

Say you have a compiled script containing, “Tell application ‘xyz’ to launch”

This script cannot be opened in a script editor on a Mac not having app xyz on the hard drive.

All you get is a dialog asking, “Where is ‘xyz’?”

I’m asking whether there’s a way to circumvent that and get into the script anyway to inspect it.

Hi Schmye,

I wish you would have said what app it was, but if an app has a creator type then you can find out if the app exists. You can get the creator type with:

set f to choose file
return file creator of (info for f)

if it has a creator type, then you can use something like this for acrobat reader which has a creator type of “CARO”:

tell application “Finder”
exists application file id “CARO”
end tell

If you’re on a computer and want to open the script before you can add these things and the computer doesn’t have the app maybe you can make a dummy applescript app with the same name.

gl,

Just select any app when asked.

It will put the name of the app you selected in the place of your “xyz” app

this allows you to open and see the script