Always get error message when running a macro/script via command line parameter (solved)

Always get error message when running a macro/script via command line parameter (solved)

2
NewbieNewbie
2

    May 05, 2009#1

    On a Windows XP SP3 system, I am trying to get a command line invocation of UltraEdit from a batch file and I can't seem to get it right. Here is my line:

    Code: Select all

    Start "UltraEdit the Model offline" "C:\Program Files\IDM Computer Solutions\UltraEdit\Uedit32.exe" "O:\ReportNet\FrameWork\Population Star Schema\JAGmodel.xml" /m="C:\My Commands\My XML Format.mac"
    When I run this I get
    UltraEdit wrote:C:\Program Files\IDM Computer Solutions\UltraEdit=C:\My Commands\My XML Format.mac contains an incorrect path.
    The macro is where I pointed "C:\My Commands" and I checked the spelling a dozen times.

    The editor starts correctly and the file specified (JAGmodel.xml) is loaded, but the macro is not run. I have read the document Run a macro or script from the command line and thought I followed it right, but no luck.

    By the way, the macro contains the following:

    Code: Select all

    InsertMode
    ColumnModeOff
    HexOff
    XMLConvertToCRLF
    ReIndentSelection
    
    Thanks again for your patience and your help.

    6,675585
    Grand MasterGrand Master
    6,675585

      May 06, 2009#2

      Use following command line (one line!):

      start "UltraEdit the Model offline" "%ProgramFiles(x86)%\IDM Computer Solutions\UltraEdit\uedit32.exe" /fni "O:\ReportNet\FrameWork\Population Star Schema\JAGmodel.xml" /m="C:\My Commands\My XML Format.mac"

      /fni - Force New Instance must be the first parameter.

      I have already sent a few days ago an email to IDM with the suggestion to automatically implicit /fni when UltraEdit is started with the command line option /m or /s because it is impossible to pass the command line parameters to an existing instance of UltraEdit when a macro or script should be executed.

      The existing instance have maybe already files open, the opened files could be modified and not saved, a macro file different to the one which should be executed could be already loaded in this instance, or the existing instance even executes currently a macro or a script or a user tool. So if a user has not enabled the configuration setting Allow multiple instances the macro or script execution must be done in a new instance.

      But the users often don't know all these facts and therefore don't specify the /fni parameter and the result is what you see when an UltraEdit instance is already running. I'm sure your command line works if no UltraEdit is running. I hope that in one of the next future versions an explicit /fni is not needed anymore when the command line contains /m or /s.

      Run start /? from within a command prompt window or via Advanced - DOS Command from within UltraEdit for details on this standard Windows command and which parameter it offers like /min and /wait. Note: The command start interprets often the first double quoted string as window title even if no console window is opened because the application to start is a GUI application like UltraEdit. Therefore specify as first parameter for start always a double quoted title string which can be just an empty string specified with "" after start and a space character.

      2
      NewbieNewbie
      2

        May 06, 2009#3

        Thank you. It worked of course. :wink: I never would have come up with that.

        236
        MasterMaster
        236

          May 06, 2009#4

          Wow. Subtle.