Editing JScript source code files

You can associate JScripts with various events that are fired by ArcPad forms, tools, and system objects. Although you can type a complete script in the Event Script text box for each event, it is often more efficient to type all the scripts needed for a customization file in a single JScript source code file as subroutines and functions. You can then call the appropriate subroutine or function in the Event Script text box for each event.

ArcPad Studio provides a JScript source code editor where you can type and debug your scripts. JScript syntax is automatically formatted and color coded as you type.

Finding text in a JScript source code file

Steps:
  1. Create or open a JScript source code file.
  2. Click the Find button Find on the standard toolbar.

    The Find dialog box appears.

  3. Type the text you want to find, then click Find Next.

    • Repeat this step as necessary to find all occurrences of the text.
    • Click the Repeat button Repeat to repeat the last search.

  4. Click Cancel to close the Find dialog box.

Replacing text in a JScript source code file

Steps:
  1. Create or open a JScript source code file.
  2. Click the Edit menu, then click Replace.

    The Replace dialog box appears.

  3. Type the text you want to replace in the Find what text box.
  4. Type the replacement text in the Replace with text box.
  5. Click Find Next to find the next occurrence of the text, then click Replace.

    Repeat this step as necessary to replace all occurrences of the text, or click Replace All (instead of Replace) to replace all occurrences of the text without manually going through each occurrence.

  6. Click Cancel to close the Replace dialog box.

Moving to a specific line number in a JScript source code file

Steps:
  1. Create or open a JScript source code file.
  2. Click the Go to button Go To on the standard toolbar.
  3. Type the line number where you want to move.
  4. Click OK.


2/7/2013