On Aug 11, 2011, at 5:35 PM, Luther Fuller wrote: I have a script, "Script Bundle Tool", that I've been using for years without any problem.
I now have Script Bundle Tool working correctly, but I ran into another problem getting there. You might be interested, so I'll pass it along.
When SBT makes an application bundle, it should ... 1. Open a script with ASE; 2. Create, via ASE, an application bundle in the temporary items folder; 3. Quit ASE.
Step 3 has been failing. I suspected due to this line ...
tell application "Finder" to set dontQuitEditor to (exists process "AppleScript Editor") or (exists process "Script Editor")
I tested this line via Smile and could find nothing wrong with it. It ought to work. But it doesn't! I did notice that process in Finder's dictionary is "Legacy", so I tried this in SBT ...
tell application "System Events" to set dontQuitEditor to (exists process "AppleScript Editor") or (exists process "Script Editor")
This fixed the problem! Yet, I could not find a specific problem with the first line. Perhaps it only fails when run from an application bundle. (?)
BTW Re: Script size question asked by Alex Zavatone ... When I use SBT to create an application bundle from a large script (578190 chars = 104401 words = 12578 lines, so says TextWrangler) steps 1, 2, 3 takes about 1 sec. It's very quick.
|