The JMP Version() inquiry function returns the JMP version as a string. You might use this function to determine the JMP version and then run a script compatible with that version.
JMP Version(); // returns "13.0.0" in JMP 13
JMP Version(); // returns " 9.0.0" in JMP 9

Help created on 9/19/2017