Loading ...
Sorry, an error occurred while loading the content.
 

Copying Text in a Keystroke Recording

Expand Messages
  • Bill Walsh
    I am trying to copy text using a keystroke recording from somewhere in a complex line of text to a precice position near the end, but it is not working as I
    Message 1 of 10 , Oct 23, 2012
      I am trying to copy text using a keystroke recording from somewhere in a complex line of text to a precice position near the end, but it is not working as I expect. I have the following text:

      xxxx stuff: 1d53
      xxxxxxxxx stuff: 5srj
      xx stuff: ab32
      xxxx stuff: 2g39

      I want to make something like this:

      xxxx stuff: 1d53 stuff: 1d53
      xxxxxxxxx stuff: 5srj stuff: 5srj
      xx stuff: ab32 stuff: ab32
      xxxx stuff: 2g39 stuff 2g39

      The text I want to copy is alway the same length.

      Each line contains different length text so I can't just do a column copy, the text "stuff: xxxx" is always in a different location, so I have to FIND it on every line. The target locaton is alway near the end, I can backspace to it easily.

      I do the following steps:
      I find "stuff" F3
      I use Alt+C .... Alt+C to mark all 11 characters
      then CTRL+C to copy the 11 marked characters to the clipboard
      I go to end of line and backspace to the target locaion
      Then copy the text CTRL+V

      It works the first time only. After that it copies the same original text, never the next line.
      When I run the recording stuff: 1234 is the only text copied.
      It seems like CTRL+C only works the first time and never again.

      My steps work when I run them manually.

      I'm befuddled!

      What am I doing wrong?

      Thanks,
      Bill
    • John C Craig
      Hi Bill, I doubt it s this easy, but when I m recording a macro I always end by using [home] [down-arrow] as the last steps to move my cursor to the start of
      Message 2 of 10 , Oct 23, 2012
        Hi Bill,

        I doubt it's this easy, but when I'm recording a macro I always end by
        using [home] [down-arrow] as the last steps to move my cursor to the start
        of the next line. Is your cursor ending up where it will keep finding the
        same thing each time? Like at the start of the same line each time?

        -John

        On Tue, Oct 23, 2012 at 2:08 PM, Bill Walsh <bills_eyepiece@...>wrote:

        > **
        >
        >
        > I am trying to copy text using a keystroke recording from somewhere in a
        > complex line of text to a precice position near the end, but it is not
        > working as I expect. I have the following text:
        >
        > xxxx stuff: 1d53
        > xxxxxxxxx stuff: 5srj
        > xx stuff: ab32
        > xxxx stuff: 2g39
        >
        > I want to make something like this:
        >
        > xxxx stuff: 1d53 stuff: 1d53
        > xxxxxxxxx stuff: 5srj stuff: 5srj
        > xx stuff: ab32 stuff: ab32
        > xxxx stuff: 2g39 stuff 2g39
        >
        > The text I want to copy is alway the same length.
        >
        > Each line contains different length text so I can't just do a column copy,
        > the text "stuff: xxxx" is always in a different location, so I have to FIND
        > it on every line. The target locaton is alway near the end, I can backspace
        > to it easily.
        >
        > I do the following steps:
        > I find "stuff" F3
        > I use Alt+C .... Alt+C to mark all 11 characters
        > then CTRL+C to copy the 11 marked characters to the clipboard
        > I go to end of line and backspace to the target locaion
        > Then copy the text CTRL+V
        >
        > It works the first time only. After that it copies the same original text,
        > never the next line.
        > When I run the recording stuff: 1234 is the only text copied.
        > It seems like CTRL+C only works the first time and never again.
        >
        > My steps work when I run them manually.
        >
        > I'm befuddled!
        >
        > What am I doing wrong?
        >
        > Thanks,
        > Bill
        >
        >
        >



        --
        JohnClarkCraig.com, Sun-Track.com
        LucidLights.com, LucidBrake.com
        WritersSummit.com, BooksToBelieveIn.com, Getting-Published.com
        ForTheWealthOfAll.com, Passivillionaire.com


        [Non-text portions of this message have been removed]
      • Szurap Mikl√≥s
        Hi, Why don t you do a regexp search-and-replace first? search for: (.*)? stuff replace for: stuff Mike 2012/10/23 Bill Walsh ...
        Message 3 of 10 , Oct 23, 2012
          Hi,

          Why don't you do a regexp search-and-replace first?

          search for: (.*)? stuff
          replace for: stuff

          Mike

          2012/10/23 Bill Walsh <bills_eyepiece@...>

          > **
          >
          >
          > I am trying to copy text using a keystroke recording from somewhere in a
          > complex line of text to a precice position near the end, but it is not
          > working as I expect. I have the following text:
          >
          > xxxx stuff: 1d53
          > xxxxxxxxx stuff: 5srj
          > xx stuff: ab32
          > xxxx stuff: 2g39
          >
          > I want to make something like this:
          >
          > xxxx stuff: 1d53 stuff: 1d53
          > xxxxxxxxx stuff: 5srj stuff: 5srj
          > xx stuff: ab32 stuff: ab32
          > xxxx stuff: 2g39 stuff 2g39
          >
          > The text I want to copy is alway the same length.
          >
          > Each line contains different length text so I can't just do a column copy,
          > the text "stuff: xxxx" is always in a different location, so I have to FIND
          > it on every line. The target locaton is alway near the end, I can backspace
          > to it easily.
          >
          > I do the following steps:
          > I find "stuff" F3
          > I use Alt+C .... Alt+C to mark all 11 characters
          > then CTRL+C to copy the 11 marked characters to the clipboard
          > I go to end of line and backspace to the target locaion
          > Then copy the text CTRL+V
          >
          > It works the first time only. After that it copies the same original text,
          > never the next line.
          > When I run the recording stuff: 1234 is the only text copied.
          > It seems like CTRL+C only works the first time and never again.
          >
          > My steps work when I run them manually.
          >
          > I'm befuddled!
          >
          > What am I doing wrong?
          >
          > Thanks,
          > Bill
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Maurice Snellen
          On Tuesday, October 23, 2012 at 20:08 (which was Tuesday, October 23, ... Would i not be easier to use a regular expression search and replace for this: Find:
          Message 4 of 10 , Oct 24, 2012
            On Tuesday, October 23, 2012 at 20:08 (which was Tuesday, October 23,
            2012 at 22:08 where I am) Bill Walsh wrote:

            > I am trying to copy text using a keystroke recording from somewhere
            > in a complex line of text to a precice position near the end, but it
            > is not working as I expect. I have the following text:
            >
            > xxxx stuff: 1d53
            > xxxxxxxxx stuff: 5srj
            > xx stuff: ab32
            > xxxx stuff: 2g39
            >
            > I want to make something like this:
            >
            > xxxx stuff: 1d53 stuff: 1d53
            > xxxxxxxxx stuff: 5srj stuff: 5srj
            > xx stuff: ab32 stuff: ab32
            > xxxx stuff: 2g39 stuff 2g39

            Would i not be easier to use a regular expression search and replace for
            this:

            Find: (.+) (stuff: ....)
            Replace: \1 \2 \2

            Make sure 'Regular Expression' is checked.

            --
            Greetings,
            Maurice
          • Bill Walsh
            Thanks for the quick response. John, It must be finding the next occurance because the text is added to the NEXT line. If it weren t finding the next
            Message 5 of 10 , Oct 24, 2012
              Thanks for the quick response.

              John,
              It must be finding the next occurance because the text is added to the NEXT line. If it weren't finding the next occurance, which is on the next line, I think the copy would be added to the end of the same line.

              Maurice,

              As for regular expressions, I'm not too familiar with them, but from what I can gather it would not work because the lines are long and the text I'm searching for is somewhere near the middle, the copied text must be inserted at the end near the end delimiter.

              - Bill

              --- In editplus@yahoogroups.com, Maurice Snellen <maurice@...> wrote:
              >
              > On Tuesday, October 23, 2012 at 20:08 (which was Tuesday, October 23,
              > 2012 at 22:08 where I am) Bill Walsh wrote:
              >
              > > I am trying to copy text using a keystroke recording from somewhere
              > > in a complex line of text to a precice position near the end, but it
              > > is not working as I expect. I have the following text:
              > >
              > > xxxx stuff: 1d53
              > > xxxxxxxxx stuff: 5srj
              > > xx stuff: ab32
              > > xxxx stuff: 2g39
              > >
              > > I want to make something like this:
              > >
              > > xxxx stuff: 1d53 stuff: 1d53
              > > xxxxxxxxx stuff: 5srj stuff: 5srj
              > > xx stuff: ab32 stuff: ab32
              > > xxxx stuff: 2g39 stuff 2g39
              >
              > Would i not be easier to use a regular expression search and replace for
              > this:
              >
              > Find: (.+) (stuff: ....)
              > Replace: \1 \2 \2
              >
              > Make sure 'Regular Expression' is checked.
              >
              > --
              > Greetings,
              > Maurice
              >
            • Maurice Snellen
              On Wednesday, October 24, 2012 at 12:04 (which was Wednesday, October ... It might still be possible, but we would need a more accurate example of the text
              Message 6 of 10 , Oct 24, 2012
                On Wednesday, October 24, 2012 at 12:04 (which was Wednesday, October
                24, 2012 at 14:04 where I am) Bill Walsh wrote:

                > As for regular expressions, I'm not too familiar with them, but from
                > what I can gather it would not work because the lines are long and the
                > text I'm searching for is somewhere near the middle, the copied text
                > must be inserted at the end near the end delimiter.

                It might still be possible, but we would need a more accurate example of
                the text you're trying to 'mangle' to come up with a solution.

                --
                Greetings,
                Maurice
              • Jody Gerst
                newline is n tab is t ( ) surround a tagged expression for use when you replace as 1 2 etc. [ ] surround options [0-9] is any single digit number .
                Message 7 of 10 , Oct 24, 2012
                  newline is \n
                  tab is \t
                  ( ) surround a "tagged" expression for use when you replace as \1 \2 etc.
                  [ ] surround options [0-9] is any single digit number
                  . represents any character at all
                  + is one or more... so ABC+ will match ABCCC but not ABDC
                  * is zero or more... ABC*D will match both ABD and ABCCCCD
                  ? is zero or one... A?B?C will match AC and BC and ABC and C
                  ^ represents the beginning of a line (this doesn't work in Editplus
                  with the alternate regex formula
                  except: if ^ is in [ ] it means anything but these options
                  $ represents the end of a line (not including \n)
                  | is OR, so AB|C wlll match AC but will only match the AB in ABC
                  I often use the construction below:

                  Find:
                  ^([^\n]+)(stuff): ([^\n]+)\n

                  Replace with:
                  \1 \2: \3 \2: \3\n

                  ^ Beginning of line (using the construction below you may not need this)
                  ([^\n]+) Anything that isn't a newline (Tagged Expression \1)
                  (stuff): Stuff (Tagged Expression \2) and a semicolon
                  ([^\n]+) Anything that isn't a newline (Tagged Expression \3)
                  \n The newline character at the end of the line

                  \ can also be used with any characters that need to be escaped
                  Don't forget to escape literals \( \) \[ \] \* \. \? \+ \|
                  for a literal \ you'd use \\
                • John C Craig
                  I duplicated the problem here, so I see what you re talking about. I think it has something to do with using Alt-c to select the text. I changed that in my
                  Message 8 of 10 , Oct 24, 2012
                    I duplicated the problem here, so I see what you're talking about. I think
                    it has something to do with using
                    Alt-c to select the text. I changed that in my macro to something
                    different and it started working
                    correctly. After finding what you want to copy, press the left arrow just
                    once to get the cursor just to the left of the
                    stuff to select. (That effectively de-selects the item.) Then hold down
                    the shift key while pressing the
                    right-arrow key to move to the end of the stuff to select. Once the entire
                    item is highlighted, press
                    Ctrl-c to copy it. Move to the position desired and do the Ctrl-v paste.


                    [Non-text portions of this message have been removed]
                  • Bill Walsh
                    John, That did the trick. Thanks. Bill
                    Message 9 of 10 , Oct 25, 2012
                      John,

                      That did the trick. Thanks.

                      Bill

                      --- In editplus@yahoogroups.com, John C Craig <jccraig@...> wrote:
                      >
                      > I duplicated the problem here, so I see what you're talking about. I think
                      > it has something to do with using
                      > Alt-c to select the text. I changed that in my macro to something
                      > different and it started working
                      > correctly. After finding what you want to copy, press the left arrow just
                      > once to get the cursor just to the left of the
                      > stuff to select. (That effectively de-selects the item.) Then hold down
                      > the shift key while pressing the
                      > right-arrow key to move to the end of the stuff to select. Once the entire
                      > item is highlighted, press
                      > Ctrl-c to copy it. Move to the position desired and do the Ctrl-v paste.
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                    • Bill Walsh
                      John, That did the trick. Thanks. Bill
                      Message 10 of 10 , Oct 25, 2012
                        John,

                        That did the trick. Thanks.

                        Bill

                        --- In editplus@yahoogroups.com, John C Craig <jccraig@...> wrote:
                        >
                        > I duplicated the problem here, so I see what you're talking about. I think
                        > it has something to do with using
                        > Alt-c to select the text. I changed that in my macro to something
                        > different and it started working
                        > correctly. After finding what you want to copy, press the left arrow just
                        > once to get the cursor just to the left of the
                        > stuff to select. (That effectively de-selects the item.) Then hold down
                        > the shift key while pressing the
                        > right-arrow key to move to the end of the stuff to select. Once the entire
                        > item is highlighted, press
                        > Ctrl-c to copy it. Move to the position desired and do the Ctrl-v paste.
                        >
                        >
                        > [Non-text portions of this message have been removed]
                        >
                      Your message has been successfully submitted and would be delivered to recipients shortly.