Previous Topic

Next Topic

Book Contents

Book Index

Geocode Script Editor

Navigator > Setup > Company > Scripts > Geocode Script Editor

Use the Geocode Script Editor to edit Geocode scripts, such as scripts for the Company.OnMap and Company.OnGeoCode script events.

The Geocode Script Editor includes the Context object, available under the Objects menu, which contains properties for the context in which the script is triggered to return latitude and longitude. The Context object may be documented from the Automated menu, select Automated > Context > Document Context.

Enter MaxBasic code, or the value of an expression property, or select an item from a menu to insert in Code Editor at the pointer position. You can construct statements and expressions. Code Editor in Report Designer is a modal window. The code "belongs" to the band property or the expression being edited.

See also Script Editor and Script Editor Shortcut Keys. To access the Code Editor Context Menu, right-click in the script editor window, or press Shift+F10. You can insert Automated code snippets in the Code Editor, see Automated Snippets.

Sample Geocode Scripts are available in the AccredoDirectory\Scripts\COGeocodeContext directory. You can use these as a starting point for developing Geocode scripts.

Drop down menus

MenuPopup

Operators (Alt+O)

Lists MaxBasic operators.

MenuPopup

Objects (Alt+J)

Lists the objects and components available from the code. Components placed in the report will appear here. When you select a property it will appear in the code. The Context object is specific to the Geocode Script Editor.

MenuPopup

Functions (Alt+F)

Lists the functions available. When you select a function that expects arguments, parentheses and commas for the arguments are shown with the pointer at the first argument, for example, InStr(|, )

Help for a function, detailing the arguments, is available from the final option in the menu, or by pressing F1 or selecting from the context menu (right click) with the cursor positioned in the function name in the editor.

MenuPopup

Components (Alt+C)

Lists properties of the components available.

MenuPopup

Automated (Alt+A)

Lists Automated objects. Documentation for an object is available from the final option in the menu.

MenuPopup

Procedures (Alt+E)

Lists Function and Sub procedures imported into the script. Use Ctrl+E to open the Procedure List in a separate window.

MenuPopup

Help (Alt+H)

Access resources including descriptions, documentation and sample code.

 

Snippet (Alt+T)

Insert a code Snippet. Snippets are listed alphabetically, and the first line of each snippet is displayed.

Editor buttons

ScriptCheck

Check Code (Alt+C)

Checks the code compiles correctly, without running the script.

Set/Clear Breakpoint (Alt+B)

Set a code breakpoint on the current line. Click again to toggle to clear the breakpoint. You can also click to the right of a line to set or clear a breakpoint.

Hover the mouse over a breakpoint, then right-click to make a breakpoint unavailable, or access the Breakpoint Properties.

If a condition has been set for a breakpoint, it will be shown when you hover over the breakpoint.

Print (Ctrl+P)

Print the code. This can be helpful when writing scripts.

 

Capture Status Hints

Selected, you can capture status hints when the script is Run. This is useful for checking the effect of a script.

 

Add Shortcut (Alt+D)

Select to:

  • Add Shortcut - add the script as a Shortcut on the Accredo toolbar and / or the Navigator
  • Add Script Event - attach the script to a Script Event
  • View Script Events - view all Script Events. This can be useful for ascertaining whether a script event already exists.

Check and Save
(Alt+K)

Check the code compiles correctly then save the script.

Load... (Alt+L)

Load an existing script to select the code, run, print or edit.

Save... (Ctrl+S)

Once saved, you can run the script, or setup a script shortcut or script event.

In This Section

Geocode Script Editor Objects