alt+pgup/pgdn to scroll one screen left/right

alt+pgup/pgdn to scroll one screen left/right

5
NewbieNewbie
5

    Nov 26, 2008#1

    Oops, i see now this is a user-to-user forum. But if somebody knows how to achieve this myself, just let me know -tks!
    ========
    It would be great if you could add this keyboard shortcut just like ms excel has.
    Then one won't have to go searching with the mouse, for where to click on the panes.
    Thanks for the great app.

    6,686585
    Grand MasterGrand Master
    6,686585

      Nov 27, 2008#2

      What about using soft word-wrap on window border? Then you would not need to scroll left/right anymore.

      You could write 2 scripts called by the hot keys you like to move the cursor in the current line +80 columns or -80 columns if possible. That's not exactly what you want, but maybe a good workaround.
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Nov 28, 2008#3

        Hi, thanks for the tip! Excuse my ignorance, but could you tell me where to start, if I want to do like you say.
        (Greetings from R of SA...)
        T

        6,686585
        Grand MasterGrand Master
        6,686585

          Nov 28, 2008#4

          uetrtr wrote:But could you tell me where to start
          Start with what, using soft word-wrap or writing the scripts?
          Best regards from an UC/UE/UES for Windows user from Austria

          5
          NewbieNewbie
          5

            Nov 28, 2008#5

            I assume you mean something like:
            Create a macro.
            Edit its script to e.g. go to row=x, col=y where:
            x = current row i.e. unchanged
            y = current col + 100 say.
            This will in effect scroll to the right hand side.
            There is a script command 'gotoline'.
            But it always defaults to 'gotoline X' when I save the macro, even if I enter say 'gotoLine X/Y' in the script.

            In other words: I cannot get it to go to column Y.

            Can you help?

            6,686585
            Grand MasterGrand Master
            6,686585

              Nov 29, 2008#6

              No, I have not meant to use a macro. I have written about using scripts. The macro environment offers no method to get current column number and add or subtract a fixed value, but the script environment does. Here are the 2 scripts. You have to copy each of them into a separate *.js file:

              Code: Select all

              // Script to move the cursor x columns to left - move window left.
              UltraEdit.outputWindow.showStatus=false;
              if(UltraEdit.document.length > 0) {
                 var Column = UltraEdit.activeDocument.currentColumnNum;
                 if (typeof(UltraEdit.activeDocumentIdx) == "undefined") Column++;
                 if(Column > 100) Column -= 100;
                 else Column = 1;
                 UltraEdit.activeDocument.gotoLine(0,Column);
              }
              
              
              // Script to move the cursor x columns to right - move window right.
              UltraEdit.outputWindow.showStatus=false;
              if(UltraEdit.document.length > 0) {
                 var Column = UltraEdit.activeDocument.currentColumnNum;
                 if (typeof(UltraEdit.activeDocumentIdx) == "undefined") Column++;
                 /* First move the cursor 200 columns to right to force
                    a complete horizontal scroll of the active window. */
                 UltraEdit.activeDocument.gotoLine(0,Column + 200);
                 // Next set the cursor to the really wanted position.
                 UltraEdit.activeDocument.gotoLine(0,Column + 100);
              }
              Unfortunately the simple and fast script solution has one big disadvantage - by default when running a script a status message is written into the output window overwritting existing output window content. So maybe 2 macros are really better and I have had also an idea how to code it.

              Macro to move the cursor x columns to left - move window left:

              Loop 100
              IfColNum 1
              ExitLoop
              Else
              Key LEFT ARROW
              EndIf
              EndLoop


              I have named above macro "Window Left" which is important because this macro is used also in the second macro.

              Macro to move the cursor x columns to right - move window right:

              Loop 200
              IfCharIs 13
              ExitLoop
              Else
              IfCharIs 10
              ExitLoop
              Else
              Key RIGHT ARROW
              EndIf
              EndIf
              EndLoop
              PlayMacro 1 "Window Left"


              The macro name is case-sensitive!
              Best regards from an UC/UE/UES for Windows user from Austria

              5
              NewbieNewbie
              5

                Dec 01, 2008#7

                Wow, looks extremely promising - this can open up a new avenue in my use of UE! Will try it when I have time (boss keeps looking over my shoulder...) Your help is [extremely] much appreciated! Best regards