Debugging UltraEdit macros

Debugging UltraEdit macros

1002
Power UserPower User
1002

    13:40 - Jun 15#1

    I'm trying to write some UltraEdit macros and debug some mistakes I make.

    I'm not finding a way to decrease the processing speed to see step-by-step of each line.

    It should have some kind of delay or wait command to put between lines to watch what is going on, during the macro playing.
    Or some brute force way, as to count from 0 to 10000 between lines.

    Is there a way to do that?
    How to run a macro in a slow speed?

    There is no "delay" or "wait" command available, as I've already know.

      17:33 - Jun 15#2

      Playing around, I found a half solution and a very ugly one.
      To put between lines:

      Code: Select all

      Loop 1000
      Key LEFT ARROW
      Key RIGHT ARROW
      EndLoop
      
      😳

      But, even that, I cannot see the steps clearly.

      Anyone has a more elegant suggestion?

      6,687586
      Grand MasterGrand Master
      6,687586

        7:23 - Jun 16#3

        UltraEdit macros are usually recorded and not often written from scratch. There is no debugging interface available at all.

        There can be used the macro command ExitMacro inside a macro and run the macro on a saved file. It can be seen how the macro changed the active file, what is selected and where the caret is in the active file on having executed the macro up to this command. Then a Revert to saved needs to be executed to restore the initial file content before modifying the macro for improving it or just moving the macro command ExitMacro to another position in macro code and run the macro once again on active file.

        There can be used also something like GetString "Break 1" inside the macro to get the dialog window Data Input: opened on execution of the macro to view the active document below the dialog window. But it can happen that the active document window is not yet redrawn for showing the latest changes on active file before the dialog window is opened for entering a string. In such cases the usage of GetString "Break 2" as next command below GetString "Break 1" usually helps to get the active document window displayed refreshed after first execution of GetString. The Data Input: dialog window must be closed with clicking on button OK without entering any string.

        The macro property Disable screen refresh during macro playback must be unchecked for the macro in development or investigation.
        Best regards from an UC/UE/UES for Windows user from Austria

        1002
        Power UserPower User
        1002

          8:57 - Jun 16#4

          Thank you, Mofi.

          I see. Your suggestions help a little and I'll use them.

          👍