Renumber or remove line numbers from file

Renumber or remove line numbers from file

10
Basic UserBasic User
10

    Sep 22, 2006#1

    I'm looking for some help to create a macro using UltraEdit-32. The macro would renumber the current file (because it is out of sequence) or it would have the option to remove the assigned line numbers and not renumber the file. The line numbers always starts with an "N" and are normally incremented by 5 or 10. So the line numbers start with "N5" or "N10" and continue to grow to "N10000" and beyond. Below is a sample of the start of a NC program. When the line starts with a %, O or ( a line number should not be assigned.


    Thanks,
    Jim

    Code: Select all

    %
    O5123(ORIFICE)
    (HOUSING, SIZE 23S)
    ( SET Z1.00" FROM FACE OF COLLET.)
    ( PROGRAMMED FOR 1.181 DIA STOCK.)
    ( ROUGH FACE.)
    ( LEAVE .005STK)
    ( .0313 RADIUS TURN TOOL)
    N5G00X4.25Z5.625
    N10T0808
    N15G98
    N20G18
    N25G97S692M04
    N30G98G01X.6899Z.005F400.M08
    N35G96S250
    N40G99G01X-.0313F.005
    N45Z.08
    N50M09
    N55M05
    N60G98G01X4.25Z5.625F400.T0800
    N65M01
    N70G10P10002Z2.766000(ZGEOMETRYOFFSET)
    ( DRILL AND BORE.)
    ( NOTEO ORIENT TOOL WITH CUTTING EDGE)
    (          AT POS X LOC, INLINE WITH CENTERLINE.)
    ( .703 KOMET DRILL  THRU COOLANT)
    N75G00X4.25Z5.625
    N80T0202
    N85G98
    Etc...
    Etc...
    %

    6,686585
    Grand MasterGrand Master
    6,686585

      Sep 23, 2006#2

      Seems to be no problem.

      First you must create the macro CountUp posted at counter ?
      But for your special purpose I suggest to add following 3 additional lines at the end of this macro:

      StartSelect
      Key HOME
      EndSelect

      This makes the main macro more easily because you can then run the submacro CountUp directly 5 times to increase the number always with 5 without selecting the number and calling the submacro in the main macro 5 times per line with a line number.

      It's important that you first create the submacro before creating the main macro with the PlayMacro command. This command will be automatically deleted without a warning from the main macro when closing the main macro editing if the CountUp macro is not already present in the macro file.

      Next create the main macro with a name you like. The macro property Continue if a Find with Replace not found must be checked for the main macro. I think, I don't need to explain the main macro because it is quite simply. Here is the code for the main macro:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Top
      "
      "
      Key UP ARROW
      GetValue "Remove (0) or Renumber (1) ?"
      Key HOME
      IfCharIs "0"
      DeleteLine
      Find MatchCase RegExp "%N[0-9]+"
      Replace All ""
      ExitMacro
      EndIf
      StartSelect
      Key END
      Delete
      EndSelect
      "0"
      Clipboard 9
      StartSelect
      Key LEFT ARROW
      Copy
      EndSelect
      DeleteLine
      Bottom
      IfColNum 1
      Else
      "
      "
      EndIf
      Top
      Loop
      Find MatchCase RegExp "%[~^%(O^r^n]"
      IfNotFound
      ExitLoop
      EndIf
      EndSelect
      Key HOME
      IfCharIs "N"
      Find MatchCase RegExp "%N[0-9]+"
      EndIf

      PlayMacro 5 "CountUp"
      Key HOME
      "N"
      Key HOME
      Key DOWN ARROW
      EndLoop
      Top
      ClearClipboard
      Clipboard 0

      Add UnixReOn or PerlReOn (v12+ of UE) at the end of the macro and before the single ExitMacro command if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style.

      You can also replace the command UnixReOff with UnixReOn or PerlReOn and use ^N[0-9]+ or ^N\d+ instead of %N[0-9]+ in the 2 regular expression Find commands above and ^[^%\(O\r\n] instead of %[~^%(O^r^n].
      Best regards from an UC/UE/UES for Windows user from Austria

      10
      Basic UserBasic User
      10

        Sep 25, 2006#3

        Mofi,
        First of all thanks for the help. It does exactly what I was asking for. I need a little help understanding this section of code listed below. Also could you provide me with some logic that would re-number a file that does not have preexisting line numbers. It would need to put numbers on every line expect the ones that start with %, (, and O. Again thanks for your help. I'm a newbie and just trying to get a handle on macros.

        Best regards,
        Jim

        "0"
        Clipboard 9
        StartSelect
        Key LEFT ARROW
        Copy
        EndSelect
        DeleteLine
        Bottom
        IfColNum 1
        Else
        "
        "
        EndIf

        6,686585
        Grand MasterGrand Master
        6,686585

          Sep 25, 2006#4

          The CountUp submacro uses the number (string) hold currently in the active clipboard as number variable. It pastes it at current cursor position with overwriting existing selection if there is a selection, increases it by 1 and copies the increased number (string) back to the active clipboard.

          In your main macro user clipboard 9 is used as storage for the number (string). But before CountUp can be used the variable (= clipboard 9 content) must be initialized with start number -1, or -5 in your special case. This is done with the lines:

          "0"
          Clipboard 9
          StartSelect
          Key LEFT ARROW
          Copy
          EndSelect
          DeleteLine

          At top of the file a new line was inserted before to get the value of the question. In this new line the initial value of the number is inserted now and then copied to user clipboard 9 and the inserted line is then deleted. In 'C' this would be something like: int number=0; which must be always done before number++; or number+=5; can be used.


          Bottom
          IfColNum 1
          Else
          "
          "
          EndIf
          Top

          is a very important macro code in your main macro. I use it very often in my macros as you can see if you search the forum for my macros. It tests, if the last line of the file is terminated with a line termination character (CRLF for MS-DOS). If this is not the case, it adds at last line a line termination. It's quite simply: Bottom moves the cursor to end of file. If the cursor is now not at column 1, the last line is not terminated and "Enter" must be pressed to terminate also the last line of the file.

          Why is this important for your macro? When the last line of your file is a line with a number, it will be set and then with the following macro code the cursor is moved to start of the next line:

          Key HOME
          Key DOWN ARROW

          But cursor down will fail if the last line of the file is not terminated because there is no blank line below. So the cursor will remain at start of the last line with a number. This would cause that the Find command finds again the already set number and the result will be an endless loop because the number in the last line would be increased and increased and increased ...


          Here is the macro to insert the number on all lines which does not start with %, O or ( and is not a blank line. The macro property Continue if a Find with Replace not found must be checked for this macro too. But this macro can be used only for a file without any line starting with N[0-9]+.

          InsertMode
          ColumnModeOff
          HexOff
          UnixReOff
          Bottom
          IfColNum 1
          Else
          "
          "
          EndIf
          Top
          "0"
          Clipboard 9
          StartSelect
          Key LEFT ARROW
          Cut
          EndSelect
          Loop
          Find MatchCase RegExp "%[~^%(O^r^n]"
          IfNotFound
          ExitLoop
          EndIf
          EndSelect
          Key LEFT ARROW
          PlayMacro 5 "CountUp"
          Key HOME
          "N"
          Key HOME
          Key DOWN ARROW
          EndLoop
          Top
          ClearClipboard
          Clipboard 0


          But maybe it would be better to insert this feature - set number on lines which does not already have one - into the already existing main macro. This is also possible and I have updated the main macro in my first post (red marked characters) accordingly.

          The main macro now really inserts the number on every line not starting with %, O or ( and at the same time corrects lines which have already number. I always prefer single macro solution when it's possible. The main macro in my first post can now handle even a file like this which contains lines with wrong numbers and lines without a number:

          %
          O5123(ORIFICE)
          (HOUSING, SIZE 23S)
          ( SET Z1.00" FROM FACE OF COLLET.)
          ( PROGRAMMED FOR 1.181 DIA STOCK.)
          ( ROUGH FACE.)
          ( LEAVE .005STK)
          ( .0313 RADIUS TURN TOOL)
          N5G00X4.25Z5.625
          N10T0808
          N15G98
          N20G18
          N40G97S692M04
          G98G01X.6899Z.005F400.M08
          N8200G96S250
          G99G01X-.0313F.005
          Z.08

          N50M09
          N55M05
          N60G98G01X4.25Z5.625F400.T0800
          N65M01
          N70G10P10002Z2.766000(ZGEOMETRYOFFSET)
          ( DRILL AND BORE.)
          ( NOTEO ORIENT TOOL WITH CUTTING EDGE)
          ( AT POS X LOC, INLINE WITH CENTERLINE.)
          ( .703 KOMET DRILL THRU COOLANT)
          N75G00X4.25Z5.625
          N80T0202
          N85G98
          %
          Best regards from an UC/UE/UES for Windows user from Austria

          10
          Basic UserBasic User
          10

            Sep 27, 2006#5

            Mofi,
            I appreciate the help. I'll study the macro and try it out.

            Best regards,
            Jim

              Sep 27, 2006#6

              Mofi,
              Maybe you can explain the the Find MatchCase. It has a ~^ that I can't find a description of. I tested the Find MatchCase and it finds anything that doesn't match the %,(,O,CR,LF. I'm just not sure how it's functioning this way.

              6,686585
              Grand MasterGrand Master
              6,686585

                Sep 27, 2006#7

                See in help of UltraEdit the page titled Regular Expressions (Legacy). There you will find following line in the examples for UltraEdit regular expressions:
                [~0-9] matches any character except a digit (~ means NOT the following)
                Unfortunately the negative character set expression is not listed in the UltraEdit regular expression table. I will report this to IDM.

                So %[~^%(O^r^n] means find a single character which is NOT a % or ( or O or CR or LF. The % character is a regular expression character (start of line). So it must be escaped here with the ^ character to tell the regex engine that character % is meant and not start of line. ^r and ^n are special character codes for CR and LF.
                Best regards from an UC/UE/UES for Windows user from Austria

                10
                Basic UserBasic User
                10

                  Sep 28, 2006#8

                  Mofi,
                  Thanks for the explanation. I was confused until you explained the ~ function. I appreciate your help.

                  Best regards,
                  Jim

                  1
                  NewbieNewbie
                  1

                    May 03, 2007#9

                    This is the one and only thing UE didn't do that I need!
                    I'm a CNC programmer and have been using UE for several years now and love it!

                    I wrote a very simple keyboard macro to add a "N' and an incremental number after the letter to add line numbers to my programs. This was ok but not really what I was looking for.
                    Now I found this thread and was very excited till I tried to load this and make it work. I seem to be missing something.
                    It adds the "N" but then stops. I think I didn't do something correctly with the "CountUp" macro I was confused.

                    MOFI,
                    I have been helped many many times from your posts "thank you"
                    and I hoped you could give a basic step by step on how to implement this macro/s in my ultra edit.

                    And If you really want to make my day, can you modify the macro take the line of code and insert and remove spaces from between the code while adding or removing line numbers?

                    N10G00X1.0Z1.0F.005
                    to look like this
                    N10 G00 X1.0 Z1.0 F.005

                    I realize this is a bit much to ask but I'm hoping by studying your code I can eventually understand how it works so I can do things like it in the future myself.

                    At this point I am a complete newbie to this sort of language.

                    Thanks,
                    GCODER

                    344
                    MasterMaster
                    344

                      May 03, 2007#10

                      Maybe I can save your day.

                      1st, the macro property Continue if a Find with Replace not found must be checked for this macro.
                      Check this out. It might be a quick-shot but pls check it out.

                      2nd: If you are unfamiliar with regular expressions read this: Readme for the Find/Replace/Regular Expressions forum

                      So if you have UE 12 or above, set Perl-regular expression style in your options-dialog and do this replace:
                      Find:

                      Code: Select all

                      ([A-Z][0-9.]+)
                      Repl.:

                      Code: Select all

                      $1 
                      THERE IS A BLANK AFTER $1 YOU CANNOT SEE HERE.

                      Voila.

                      It's easy to do this replace also in a macro. Pls study.

                      rds Bego
                      Normally using all newest english version incl. each hotfix. Win 10 64 bit

                      6,686585
                      Grand MasterGrand Master
                      6,686585

                        May 03, 2007#11

                        Yes, check the macro property for the main macro. Check also if the main macro contains the PlayMacro command. If you have first created the main macro and then the submacro CountUp, UltraEdit has automatically removed the PlayMacro command without a warning because of missing macro CountUp.

                        Have you also added the 3 lines

                        StartSelect
                        Key HOME
                        EndSelect


                        at end of CountUp to be able to simple play the macro 5 times to increase the number by 5?

                        Here are the modified macros which insert the spaces. It uses the regular expression suggested by Bego (with additonal - in second brace for negative numbers), but in UltraEdit style as the whole macro is written for. The modified lines are highlighted with red color. You have not posted which macro you have used, from my first or my second answer?

                        Here is the modified macro from my first answer:

                        InsertMode
                        ColumnModeOff
                        HexOff
                        UnixReOff
                        Top
                        "
                        "
                        Key UP ARROW
                        GetValue "Remove (0) or Renumber (1) ?"
                        Key HOME
                        IfCharIs "0"
                        DeleteLine
                        Find MatchCase RegExp "%N[0-9]+"
                        Replace All ""
                        ExitMacro
                        EndIf
                        StartSelect
                        Key END
                        Delete
                        EndSelect
                        "0"
                        Clipboard 9
                        StartSelect
                        Key LEFT ARROW
                        Copy
                        EndSelect
                        DeleteLine
                        Bottom
                        IfColNum 1
                        Else
                        "
                        "
                        EndIf
                        Top
                        Loop
                        Find MatchCase RegExp "%[~^%(O^r^n]"
                        IfNotFound
                        ExitLoop
                        EndIf
                        EndSelect
                        Key HOME
                        IfCharIs "N"
                        Find MatchCase RegExp "%N[0-9]+"
                        EndIf
                        PlayMacro 5 "CountUp"
                        Key HOME
                        "N"
                        Key HOME
                        StartSelect
                        Key END
                        Find RegExp "^([A-Z][0-9.^-]+^)"
                        Replace All SelectText "^1 "
                        EndSelect
                        Key END
                        Key BACKSPACE

                        Key HOME
                        Key DOWN ARROW
                        EndLoop
                        Top
                        ClearClipboard
                        Clipboard 0

                        And here is the modified macro from my second answer:

                        InsertMode
                        ColumnModeOff
                        HexOff
                        UnixReOff
                        Bottom
                        IfColNum 1
                        Else
                        "
                        "
                        EndIf
                        Top
                        "0"
                        Clipboard 9
                        StartSelect
                        Key LEFT ARROW
                        Cut
                        EndSelect
                        Loop
                        Find MatchCase RegExp "%[~^%(O^r^n]"
                        IfNotFound
                        ExitLoop
                        EndIf
                        EndSelect
                        Key LEFT ARROW
                        PlayMacro 5 "CountUp"
                        Key HOME
                        "N"
                        Key HOME
                        StartSelect
                        Key END
                        Find RegExp "^([A-Z][0-9.^-]+^)"
                        Replace All SelectText "^1 "
                        EndSelect
                        Key END
                        Key BACKSPACE

                        Key HOME
                        Key DOWN ARROW
                        EndLoop
                        Top
                        ClearClipboard
                        Clipboard 0
                        Best regards from an UC/UE/UES for Windows user from Austria

                        3
                        NewbieNewbie
                        3

                          May 17, 2007#12

                          I've been using UE for 7-8 years to code AutoLisp as well as edit CNC machine code files. This re-numbering macro works great as posted, but I've got a couple questions and/or issues. I'm using the macro Mofi posted on 09/23/2006 and UE 10.10a. when running the macro I have a comment enclosed with parenthesis on some of the lines that get re-numbered and it is dropping the closing parenthesis ")" from the end of these lines.

                          I am just starting to look at the macro code posted as I have never created or edited macros for UE before today! I do have some ideas I would like to try or get ideas about to make this macro more flexible.

                          1. Ability to re-number only a selection of lines in the file, either by actually selecting the lines or specifying start and end line numbers. (not N#### line numbers!)

                          2. Ability to select a starting number for the re-numbering... i.e. N2000, N3000, etc...

                          3. Ability to select an increment for the re-numbering. Macro is currently hard-coded for increments of 5, but can this be a dynamic number entered at run time?

                          Thanks for the re-numbering macro and help/trainiing/reference posts, as well as any future ideas and posts!!!

                          Dave

                            May 18, 2007#13

                            I think I've answered and/or solved most of my own questions from 05/17/2007. First, the disappearing parenthesis issue... in the section of Mofi's code that adds a space after a block of text there was a BACKSPACE command to remove the trailing space at the end of the line. I removed this command and simply used a TRIMTRAILINGSPACES command.

                            Solution to item #1... I pre-select the section of the CNC code file I want to re-number, then run the macro. The macro starts with a cut and paste to a new temporary file, performs the re-numbering as normal, then pastes it back into the original file. In the version of UE I'm using (ver 10.10a), when the temp file is closed without save, the last active tab is defaulted to, but I see from Mofi's notes that newer versions behave differently so the macro would have to be modified accordingly.

                            Solution to item #2... In Mofi's original macro, he has a "0" hard coded before the loop that the 'CountUp' sub-macro uses to start counting from. I replaced this with a GETVALUE command and enter whatever starting number I want. The only trick here is that when the loop runs to do the count up, it adds whatever the PLAYMACRO count is to the number. So... if you want to start the re-numbering at N1000 and the PLAYMACRO is set to run 2 times, you actually have to enter 998 at the prompt.

                            Solution to item #3... Couldn't figure out a way to do this one... guess I can't have everything!

                            Here is the final macro I came up with. I'm pretty sure there is some redundant commands in there, but it does the job!

                            Code: Select all

                            InsertMode
                            ColumnModeOff
                            HexOff
                            UnixReOff
                            Clipboard 8
                            Cut 
                            NewFile
                            Paste 
                            Top
                            "
                            "
                            Key UP ARROW
                            GetValue "Enter Starting N-Block Number -2"
                            Clipboard 9
                            StartSelect
                            Key HOME
                            Copy 
                            EndSelect
                            DeleteLine
                            Bottom
                            IfColNum 1
                            Else
                            "
                            "
                            EndIf
                            Top
                            Loop 
                            Find MatchCase RegExp "%[~^%(O^r^n]"
                            IfNotFound
                            ExitLoop
                            EndIf
                            EndSelect
                            Key HOME
                            IfCharIs "N"
                            Find MatchCase RegExp "%N[0-9]+"
                            EndIf
                            PlayMacro 2 "CountUp"
                            Key HOME
                            "N"
                            Key HOME
                            StartSelect
                            Key END
                            Find RegExp "^([A-Z][0-9.^-]+^)"
                            Replace All SelectText "^1 "
                            EndSelect
                            Key HOME
                            Key DOWN ARROW
                            EndLoop
                            Top
                            ClearClipboard
                            Find "  "
                            Replace All " "
                            Top
                            TrimTrailingSpaces
                            Top
                            Clipboard 8
                            SelectAll
                            Cut 
                            CloseFile NoSave
                            Paste 
                            ClearClipboard
                            Clipboard 0
                            Top
                            Loop 
                            Find "^p^p"
                            Replace All "^p"
                            IfNotFound
                            ExitLoop
                            EndIf
                            EndLoop
                            Top
                            ExitMacro
                            Thanks again for the very helpful posts and ideas!

                            Dave :D

                            6,686585
                            Grand MasterGrand Master
                            6,686585

                              May 18, 2007#14

                              Hi Dave,

                              very well done for a macro newbie!

                              I looked on your macro code and made some changes. First I loaded the macro code into an UEM file (UE/UES macro code file) with my syntax highlighting for my macros and used Format - ReIndent Selection.

                              With indentations I could see that in all my macros I have had a small mistake: there was an EndIf too much before EndLoop. I corrected this in all my previous posts.

                              Then I started to improve your macro. First I thought, it would be a good idea to check if there is a selection and if not, select whole file by the macro. Then the user doesn't need it to do when he wants to run the macro on the whole file.

                              Next I just copied the selection to the new file instead of cutting it. This gives you the possibility to break the macro execution with ESC key or by pressing the Cancel button at any time without any modification in the source file untill renumbered selection is pasted back over still existing selection in the source file.

                              The macro does immediately after pasting the selection to the new file the check for termination of last line because the cursor is now after the paste already at bottom of the file (speed improvement).

                              Next the user must enter the starting number - yes, the real starting number. And the user must enter the increment value. Well, only incrementing by 1, 2, ... 9 is supported by this macro. So this GetValue is enclosed in a loop until the user has correctly entered the increment. The single digit increment number is stored in clipboard 8.

                              The first renumbering is done now outside the loop above the loop. This makes it possible to simply paste the starting number without using macro CountUp.

                              Then after first renumbering the loop is executed.

                              To be able to run an individual increment of 1-9, the macro evaluates the before entered increment number and calls the macro CountUp according to it's value. This is not a very good solution, because it works only for increments of 1-9. But maybe it is enough. A full support for any increment number greater than 0 would require a CountDown macro which executes CountUp until the entered increment number gets 0. That would be possible, but very slow. Using the JavaScript engine introduced with UltraEdit v13 or UEStudio v6.20 would be the much better and faster solution for this job.

                              The rest of the macro has only some small changes, nothing important.

                              Here is the improved macro which also requires macro property Continue if a Find with Replace not found enabled.

                              InsertMode
                              ColumnModeOff
                              HexOff
                              UnixReOff
                              Clipboard 9
                              IfSel
                              Else
                              SelectAll
                              EndIf
                              Copy
                              NewFile
                              Paste
                              IfColNum 1
                              Else
                              "
                              "
                              EndIf
                              Top
                              "
                              "
                              Key UP ARROW
                              GetValue "Enter Starting N-Block Number"
                              StartSelect
                              Key HOME
                              Cut
                              EndSelect
                              Loop
                              GetValue "Increment Number [1-9]"
                              IfColNum 2
                              Key LEFT ARROW
                              IfCharIs "123456789"
                              StartSelect
                              Key RIGHT ARROW
                              Clipboard 8
                              Cut
                              EndSelect
                              ExitLoop
                              Else
                              Delete
                              EndIf
                              Else
                              StartSelect
                              Key HOME
                              Delete
                              EndSelect
                              EndIf
                              EndLoop
                              DeleteLine
                              Clipboard 9
                              Find MatchCase RegExp "%[~^%(O^r^n]"
                              IfFound
                              EndSelect
                              Key HOME
                              IfCharIs "N"
                              Find MatchCase RegExp "%N[0-9]+"
                              EndIf
                              Paste
                              Key HOME
                              "N"
                              Key HOME
                              StartSelect
                              Key END
                              Find RegExp "^([A-Z][0-9.^-]+^)"
                              Replace All SelectText "^1 "
                              EndSelect
                              Key HOME
                              Key DOWN ARROW
                              EndIf
                              Loop
                              Find MatchCase RegExp "%[~^%(O^r^n]"
                              IfNotFound
                              ExitLoop
                              EndIf
                              EndSelect
                              Key HOME
                              IfCharIs "N"
                              Find MatchCase RegExp "%N[0-9]+"
                              Delete
                              EndIf
                              Clipboard 8
                              Paste
                              Clipboard 9
                              Key LEFT ARROW
                              IfCharIs "1"
                              Delete
                              PlayMacro 1 "CountUp"
                              Else
                              IfCharIs "2"
                              Delete
                              PlayMacro 2 "CountUp"
                              Else
                              IfCharIs "3"
                              Delete
                              PlayMacro 3 "CountUp"
                              Else
                              IfCharIs "4"
                              Delete
                              PlayMacro 4 "CountUp"
                              Else
                              IfCharIs "5"
                              Delete
                              PlayMacro 5 "CountUp"
                              Else
                              IfCharIs "6"
                              Delete
                              PlayMacro 6 "CountUp"
                              Else
                              IfCharIs "7"
                              Delete
                              PlayMacro 7 "CountUp"
                              Else
                              IfCharIs "8"
                              Delete
                              PlayMacro 8 "CountUp"
                              Else
                              IfCharIs "9"
                              Delete
                              PlayMacro 9 "CountUp"
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              EndIf
                              Key HOME
                              "N"
                              Key HOME
                              StartSelect
                              Key END
                              Find RegExp "^([A-Z][0-9.^-]+^)"
                              Replace All SelectText "^1 "
                              EndSelect
                              Key HOME
                              Key DOWN ARROW
                              EndLoop
                              Top
                              Find " "
                              Replace All " "
                              TrimTrailingSpaces
                              ClearClipboard
                              Clipboard 8
                              SelectAll
                              Cut
                              CloseFile NoSave
                              Paste
                              ClearClipboard
                              Clipboard 0
                              Top
                              Loop
                              Find "^p^p"
                              Replace All "^p"
                              IfNotFound
                              ExitLoop
                              EndIf
                              EndLoop
                              Best regards from an UC/UE/UES for Windows user from Austria

                              3
                              NewbieNewbie
                              3

                                May 18, 2007#15

                                Thanks for the reply! My work day is almost over so I am going to take this home to study and try it out over the weekend. I was wondering if the increment number might be able to be done in this manner. I just didn't have the brain power today to try and figure it out. Also, the idea that UE ver.13 has the capability for running Java Scripts is quite interesting.... I just might buy an upgrade over the weekend as well! BTW... I was also using your .UEM files, wordlist and taglist. I found it quite handy to look over the code as well as compare different macro code snippets side by side.

                                Thanks again!

                                Dave