LNSTempFile: What is that?

I have an app that runs on a schedule every morning and downloads and distributes production files. Usually it runs unattended early in the morning. I’ve been working on it recently (adding Progress; removing Finder calls and replacing them with script library calls) so I’ve been running it manually.

Today I noticed something odd. When the app was front most the progress window’s title was: LNSTempFile13347746

The App name in the menu bar was the same.

I tried to take a screen shoot, but the app was hung. The app seemed to finish at the same time the hang went away, so no screen shot.

To work around an AppleScript bug that causes save operations to fail when file names contain certain characters, Script Debugger saves applets using the LNSTempFile name and then renames final document. This renaming operation involves altering the Info.plist as well, which is where the displayed app name comes from.

Long ago, there were bugs where Script Debugger did not always alter the Info.plist file correctly. If this is a really old script, you can try opening it in Script Debugger and simply re-save to fix the displayed app name.

It is an old script, but it has been opened and reserved numerous times in the last few weeks.

I’m thinking about saving it as an enhanced applet. That should resolve everything, right?

Using an Enhanced Applet won’t solve this problem. SD thinks you’ve customized the Info.plist file at this point and is leaving things alone.

These solutions come to mind:

  • Create an entirely new script and copy-paste your code into it.
  • manually edit the Info.plist file within your Script to correct the CFBundpeName entry.

Interesting, so doing a save-as, and selecting enhanced app doesn’t clear the info.plist, etc.

Suppose I paste the contents into a new script, and save that as an enhanced applet, overwriting the old script in the same directory (which is how I usually do that) would that clear the old info?

Using an enhanced applet does not change the way Info.plist files are managed. The core problem is that the Info.plist file needs to be corrected. Only move to an Enhanced Applet because you want the run-time features it provides (drop-target window, etc.).