Running a user tool from within a macro

Running a user tool from within a macro

7
NewbieNewbie
7

    Oct 16, 2004#1

    I have a macro that I want to run my advanced tool command ( a Ctr+Shift+0) but I cannot figure out how to do this? Can someone help with those keystrokes?

    6,675585
    Grand MasterGrand Master
    6,675585

      Oct 26, 2004#2

      Why do you want to run the macro as tool?

      Assign a hotkey directly to the macro properties and save the macro in a macro file, which is autoloaded on UltraEdit startup. Then you can use it always by simply pressing the macro hotkey.

      It is not possible to run the macro directly as tool. It is a macro and not an exe, so it needs an interpreter, which is UltraEdit for UE-macros.

      For using in batch files it is possible to start UltraEdit with the command line option to run a specified macro from a specified macro file with certain options. Take a look at help of UE for details about the command line options.

      7
      NewbieNewbie
      7

        Oct 26, 2004#3

        You misunderstand what I am trying to do. Let me explain it a bit
        I have an SQL script such as

        UPDATE TABLE FOO SET FIELD = X
        (ETC)


        And, I have setup a tool that runs the OSQL command line tool on the current file. What I wanted to do was to automatically run the current file after changing some values in it. That way I would save the following set of keystrokes...

        REPLACE ALL value_x WITH value_y IN CURRENT TEXT FILE
        INSERT text_of_something new IN CURRENT TEXT FILE
        RUN Tool Command Ctrl+Shift+0 ON CURRENT FILE
        PARSE RESULTS INTO A NEW FILE

        See, what I mean? The tool command runs in the middle of the sequence of events, and I can do the sequence of events just fine in the macro, but I cannot start the OSQL command so that bodgers up the run.

        206
        MasterMaster
        206

          Oct 26, 2004#4

          There is a RunTool macro command, which will run a user tool from inside a macro. I use this command quite a lot. Have you played with it?

          RunTool "TOOLNAME"

          The tool name is case-sensitive.