Unexpected behaviour running a macro from the command line

Unexpected behaviour running a macro from the command line

9
NewbieNewbie
9

    May 31, 2006#1

    Two problems here, really.

    I am starting Uedit 12.10+3 from the command line with two files to open and a simple macro to run. Its purpose is to read the (very short) files looking for the string 'ERROR During" at the start of any line, and to run a Tool if found.

    The command line is:

    Code: Select all

    start uedit32.exe "C:\Bck_Log.log" "C:\Bck_Data.log" /M,E,1="C:\Logs.MAC"
    According to the Help, the "/M,E" syntax should run the macro and exit Uedit at the end. Uedit does not close, however. "Minimize on last file close" is NOT checked.

    The problem with the macro is that the Tool is run twice, even though the ERROR string only occurs in one of the files. The macro is:

    InsertMode
    ColumnModeOff
    HexOff
    UnixReOff
    Loop 2
    Top
    Find MatchCase "^PERROR During"
    IfFound
    RunTool "Entity Chart"
    EndIf
    CloseFile
    EndLoop


    Any ideas?

    TIA,
    Alan

    6,675585
    Grand MasterGrand Master
    6,675585

      May 31, 2006#2

      You use the Windows start command with double quotes on the command line. Then you have to specify a "title" before uedit32.exe - see my last post at Open file in New UE Window or my post at DOS script to start UltraEdit.

      Check if the "title" already solves the problems.
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        May 31, 2006#3

        Thanks a lot Mofi - that did it!

        Alan