Rectangle Selection Mode

Rectangle Selection Mode

4

    Aug 17, 2004#1

    Is there a way to write a macro to allow the user to enter into a rectangle selection mode? What I want to do is activate Column Mode and allow the cursor movements to select text until an edit action (Cut, Copy, ESC, ...). Any suggestions?

    6,605547
    Grand MasterGrand Master
    6,605547

      Aug 17, 2004#2

      Why do you need a macro for this?

      Simply change to column mode and move the cursor while pressing the SHIFT key to select the text. Moving the cursor while SHIFT is pressed always selects in any windows program and everywhere.

      To change column mode on/off quickly, assign a hotkey for it and/or add "Column Mode" to the toolbar.
      Best regards from an UC/UE/UES for Windows user from Austria

      206
      MasterMaster
      206

        Aug 17, 2004#3

        If you did want a macro to do this, here's a very simple example of selecting and cutting out a rectangle. You could do things like make decisions based on what the current character was (IfCharIs). Might or might not be worth the effort.


        InsertMode
        ColumnModeOff
        HexOff
        UnixReOn
        ColumnModeOn
        StartSelect
        Loop 5
        Key RIGHT ARROW
        Key DOWN ARROW
        EndLoop
        Cut
        Software For Metalworking
        http://closetolerancesoftware.com

        4

          Aug 17, 2004#4

          Thanks guys. I need this macro to simulate functionality found in BRIEF. The example macro above has a set number of cursor movements but I need to just turn on a selection mode allowing arbitrary highlighting. Imagine the user hitting Ctrl-c and then down and over some number of characters, then "+" (the BRIEF copy key stroke). Does this make sense?
          Thanks...

          206
          MasterMaster
          206

            Aug 17, 2004#5

            I'm not sure I completely understand, but I'm sort of with our Austrian friend in that it seems like you could easily do what you want using only the mouse:

            click a toolbar icon - Column Mode On
            select your text with the mouse
            click a toolbar icon or use context menu - Copy
            click a toolbar icon - Column Mode Off
            click anywhere to deselect

            The last three clicks could be made into one (no toolbar icon for macros, though) or assigned to a keystroke by using a macro.
            Software For Metalworking
            http://closetolerancesoftware.com

            4

              Aug 17, 2004#6

              Yeah, I agree that this is easy to do with a mouse. However, I am trying to emulate the BRIEF way of doing things (see http://www.lugaru.com/man/Brief.Emulation.html ). In the BRIEF editing style the user can click Ctrl-c and enter a selection mode that allows then to highlight a block of text (think column mode) without holding Shift. It is silly, but I still need to do it... Several of our developers are more comfortable and efficient using BRIEF and our new Editor will need to support these functions.

              Is it true that using StartSelect requires EndSelect in the same macro? Any ideas?

              206
              MasterMaster
              206

                Aug 17, 2004#7

                I don't know how you would be able to select text manually without using either the mouse or the Shift key. The best I can come up with is:


                Use the assigned keystroke of your choice to initialize column mode.

                Use the Shift and arrow keys to select your text

                Use the assigned keystroke of your choice to run this macro:

                Copy
                ColumnModeOff
                Key LEFT ARROW
                Key RIGHT ARROW


                The last two lines in the macro are a substitute for EndSelect, which has always been pretty unreliable for me.
                Software For Metalworking
                http://closetolerancesoftware.com