Creating a Script

  • Updated
Download Icon Download

You may write a script directly in STNext or create a search script from an imported list of terms.

Writing a Script File in STNext

  1. Click My Files, and then select Scripts.

    STNext-MyFilesMenu-Scripts.png

  2. On the Scripts page, click the Create New button, and then under Editor, select Script.

    _STNext-MyFiles-Scripts-CreateNewButton-EditorScript.png

  3. In the Create Script window, enter your script statements. Here, we've entered statements based on the example above.

    _STNext-MyFiles-CreateScriptWindow-ScriptStatements.png

  4. Click the Validate button to check the script for syntax errors. If there are any script errors, you will see a message under Validation with the line in question highlighted.

    _STNext-MyFiles-CreateScriptWindow-Validation.png

  5. An auto-generated name is applied to the script. If you wish to rename it, click the pencil icon, enter the new script name, and then click the check mark or press Enter.

    _STNext-MyFiles-CreateScriptWindow-PencilIcon.png _STNext-MyFiles-CreateScriptWindow-RenameScript.png

  6. Click the Save button to save the script to My Files > Scripts. Clicking the Run button will run the script and save it to My Files.

    _STNext-MyFiles-CreateScriptWindow-SaveButton.png

Creating a Search Script from an Imported List of Terms

STNext enables you to create a search script from a .txt, .csv, or .data file containing terms you would like to search:

  1. Click My Files, and then select Scripts.

    STNext-MyFilesMenu-Scripts.png

  2. Click the Create New button, and then select Search Terms under Convert to Script.

    _STNext-ImportSearchTerms-MyFiles-CreateNew-SearchTerms.png

  3. Click the Browse button, and then select the search term file (.txt, .csv, or .data).

    _STNext-ImportSearchTerms-MyFiles-ImportFile-Browse.png

  4. Click the Next button.

    _STNext-ImportSearchTerms-MyFiles-ImportFile-Next.png

  5. In the Create Search Term Script window:
    1. Field Code(s) to Search: Enter the field code or codes you want the script to search; multiple fields codes should be separated by a comma. In our example, we uploaded a .csv file of patent numbers, so we'll enter PN as the field code.
    2. Select term separator type: If your search term file is a:
      • .txt file that uses something other than a line break/hard return to separate terms, select it here.
      • .csv file that uses something other than a new row to separate terms, select the Comma option.
      • .data file, select the Tab option.
    3. Enclose each search term in quotes: Select this option if your search terms contain:
      • Apostrophes (e.g., 4''''-Tetrakis(hexylthio)-2)
      • Numbers/Primes (e.g., 3-cyclopropyl-2)
      • Parentheses (e.g., 2-(6-(2,4-bis(trifluoromethyl)phenyl)hexyl)-5)
      • Dashes (e.g., 2317504-85-9)
    4. Click the Ok button.

      _STNext-ImportSearchTerms-CreateSearchTermScript.png

STNext converts the search term file to a script that now appears on the Scripts page. The script name is the same as the search file you uploaded. Click the pencil icon to rename the file.

Note: Remember that you need to open a database before running the script.

 

_STNext-ImportSearchTerms-ScriptsPageWithCreatedScript.png