Tapatalk

Dialog in Macro

Dialog in Macro

6
NewbieNewbie
6

    Mar 24, 2006#1

    I need to use the ColumnInsert command in my macro. This command has one argument - the text I would like to replace. If I run Insert/Fill Columns from the menu, a dialog is shown. There I can enter the value I would like to be inserted to the column.

    Is there any way I can tell the macrocommand to show the dialog and ask me for the value like if I use the menu for the same funktionality?

    6,685587
    Grand MasterGrand Master
    6,685587

      Mar 26, 2006#2

      No! But there is a workaround for your problem.

      The macro inserts in column mode a text string surely not present in the file. Then you switch to normal mode and ask the macro user for the text which should be originally inserted in column mode. After the macro user has inserted the text via the dialog, it is copied to clipboard. Last a simple find and replace all replaces the text inserted in column mode by the macro with the text entered by the macro user:

      InsertMode
      ColumnModeOn
      HexOff
      ColumnInsert "columntextblablalba"
      ColumnModeOff
      Top
      GetString "Enter text for column insert:"
      SelectToTop
      Clipboard 9
      Cut
      Find MatchCase "columntextblablalba"
      Replace All "^c"
      ClearClipboard
      Clipboard 0
      Best regards from an UC/UE/UES for Windows user from Austria

      6
      NewbieNewbie
      6

        Mar 27, 2006#3

        Thank you. With some customizations is this exactly what I need.