13.07.2015 Views

Macro Guide - Esker

Macro Guide - Esker

Macro Guide - Esker

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the macro editorcalled by the macro without showing the line-by-line detail. Single step is good for debuggingrelatively simple macros that do not call very many subroutines. Use procedure step on macros thatcall subroutines you have already debugged and do not need to see traced in detail.NoteSingle-step doesn't work when a macro uses the SmarTerm Session.StringWait, Session.Collect, orSession.EventWait objects to control the timing and flow of the macro. In such macros you must usebreakpoints instead.NoteTo trace a macro:1. Click the Single Step or Procedure Step button on the toolbar, or Press F8 (Single Step) or Shift+F8(Procedure Step). The macro editor places the instruction pointer on the first line of the macro.When you start a trace, there may be a slight pause before the trace actually begins while the macroeditor compiles your macro. If it finds errors during compilation, you will have to correct them beforeyou can continue debugging.2. Repeat step 1 to run the marked line and then advance the instruction pointer to the next instruction.Each time you repeat step 1, the macro editor runs the line containing the instruction pointer and thenmoves to the next line.3. When you finish tracing the macro, either select <strong>Macro</strong>>Start (F5 or the toolbar button) to run the restof the macro at full speed, or select <strong>Macro</strong>>End (or the toolbar button) to stop running the macro.While you are stepping through a subroutine, you may need to determine the subroutine calls by whichyou arrived at that point in the macro. You can do this with the Calls dialog.To use the Calls dialog:1. Click the Calls button on the toolbar. The Calls dialog appears, which lists the subroutine calls madeby your macro in the course of arriving at the current subroutine.2. To view one of the subroutines listed in the Calls dialog, highlight it and click Show. The macroeditor then displays that subroutine, highlighting the currently running line. (Note, however, that theinstruction pointer remains in its original location in the subroutine.)When you are stepping through a subroutine, you may want to repeat or skip execution of a section ofcode. You can use the Set Next Statement command to move the instruction pointer to a specific linewithin that subroutine.NoteYou can only use the Set Next Statement command to move the instruction pointer within the samesubroutine.To move the instruction pointer to another line within a subroutine:1. Place the insertion point in the line where you want to resume stepping through the macro.2. Select Debug>Set Next Statement. The instruction pointer moves to the line you selected, and youcan resume stepping through your macro from there.39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!