One other thing to at @mzwald, . Add //! to the first line of the script, and the script runs automatically when opened in JMP. (In other words, the script editor does not open.). When that's combined with exit(); and the use of "private" or "invisible" tables, the user of the script might not notice it running.
Oh and about exit(); it makes the current instance of JMP or the Instance JMP it is run in quit. So make sure you save before running a script with exit(); in it.
JMP Systems Engineer, Health and Life Sciences (Pharma)