I have pieces of scripts that don’t have variables, that I need to run a lot, so I often externalize them to avoid repetition. Most work great, but now I have one that seems to get skipped when run by another script, but it runs fine when run by double-cligking the standalone script app. Why might this be, and how should I troubleshoot?
Might this have anything to do with how scripts run as apps ignore ‘delay [number]’ commands unless run straight from Script Editor?
I run scripts from other scripts using commands like this:
run script "/Volumes/HD/TestScript.app/Contents/Resources/Scripts/Main.scpt"
I often save scripts as apps if I might ever want to run them as standalones (and perhaps keep in the script menu) but when I have other scripts run them, I link into the script inside the app. I’m not too keen on the idea of having an app launch an another app because sometimes I do UI scripting and a process could go wrong if something that isn’t supposed to be frontmost barges in.
Update: There was some other phase of the script in question that I wanted to revise now, and when it proved to be harder than I thought, I discovered that it was incorrect all along; A block addressing a non-scriptable application, it never gave any error messages so I didn’t suspect anything to be wrong. But in all that discretion, that block was both failing to do what I thought it was doing, AND preventing the rest of the script from completing, including the block that tells it to run another script. Apparently things can fail quietly in the background without bold complaints and all!
So, this topic is updated as a non-issue.