I am creating a script that runs from a program called MaxIm DL. I am new to javascript but am fairly decent at Java. The program only takes JS or VBS as scripting languages. My script is supposed to grab which camera filter the camera is currently using (got CCDCamera from their website) set it to a string, take it again 3 seconds later and set it to another string. then send it though a socket to the server.
I cant get the program to even run in command prompt because it opens and closes immediately. Any help on this would be great!

Here's my code: codeviewer.org/view/code:2823