Recently I was reported about a problem with one of my scripts, that packages ID documents: a guy wrote me that when he runs it from ESTK, script works fine, but when run from Scripts panel — creates empty folders, does nothing more but generates an error (there's an error handler in the script that logs errors into a text file):
Error: Invalid value for parameter 'versionComments' of event 'packageForPrint'. Expected String, but received TRUE.
It's strange, because I don't use this optional parameter in the script.
BTW, on my computers it works ok, both in ID and ESTK.
Does anybody encountered this problem? Any ideas on why this happens?
He probably has his scriptPreferences version set to 5. To make your script foolproof, you should probably set the scriptPreferences yourself (and restore them when you are don to be nice...)
BTW, kAppVersion = parseFloat(app.version) is a more readable form for getting the version number...
You are, as always, right — this solved the problem. Thank you.
Glad to hear!