Script Tips

  • Scripts do not require a specific format or style as you type the statements, and more than one statement may appear on the same line. However, for ease of understanding the scripts you have written, use a style similar to what you see here.

  • To ensure that all STN Express® features are available while you are online, use the STNLOGON script instead of writing your own commands to log on to STN.

  • Open a new script file by selecting New from the File menu within the STN Edit window. A new, Untitled window is displayed

  • Check Script File checks your script for some errors. Getting an error-free script from the script file checker does not guarantee that the script will do what it was intended to do. A clean bill of health from the script file checker also does not guarantee there are no errors in the script because some errors cannot be found until the script is run.

  • Add comments to a script by placing a \* anywhere on the line. To display a comment on the screen, use the ECHO statement.

  • Use comments to help you and others understandable your scripts.

  • Use blank lines to make your scripts more readable.

  • Use a standard spacing and indentation scheme to make your scripts more readable.

  • When running a script, press the Escape or Clear key to stop the script.

  • All STN Express scripts must be in either the User Scripts folder or the Predefined Scripts folder. When looking for a script to execute, STN Express first checks the User Scripts folder, then the Predefined Scripts folder.

  • Enter only the unique portion of the prompt when using the WAIT FOR statement.

  • Use the SEND, WAIT FOR, and TRYAGAIN statements together because TRYAGAIN will resend the last item that was sent using a SEND statement. Many times, TRYAGAIN is an optional part of the statement trio because you would not want to resend some items, e.g., login ID or password.

  • You may use your own word processor to write a script as long as you save the file in a text-only format.

Copyright © 2017 American Chemical Society. All Rights Reserved.