select -> copy / find whats it clipboard

select -> copy / find whats it clipboard

4
NewbieNewbie
4

    Feb 16, 2005#1

    Hi,

    Im trying to create a small Macro to select text in one open document, copy it into clipboard then switch to another open document and find the string that was copied to clipboard.

    My macro looks like that

    SelectLine
    Copy
    NextDocument
    Top
    Find RegExp "^c"
    SelectLine

    somehow it doenst work. It just doesnt find the string even if the string is in the clipboard.. If I try to find the string that the macro has copied to the clipboard manualy.. i can find it.

    strings that i try to find are like this "000000149571-001-1", so I have to use selectline instead of selectword.
    any ideas how to make it work?

    regards
    Matthias

    46
    Basic UserBasic User
    46

      Feb 16, 2005#2

      Hi Akyno,

      You can't us RegExp with the ^c for clipboard replacement.
      So try this:

      Code: Select all

      SelectLine
      Copy
      NextDocument
      Top
      Find "^c"
      SelectLine 
      
      It's a limitation of the find command (it's explain in the documentation
      under regular expression).

      Regards from Geneva,
      Never forget: "Above the clouds, The sky is blue and the sun shine"

      4
      NewbieNewbie
      4

        Re: select -> copy / find whats it clipboard

        Feb 16, 2005#3

        hmm, tried it... still doesnt work... but its just a problem when I try to search for strings with - in them.. like this

        000000149521-001-1

        if I remove the - (0000001495210011) and use selectword instead of selectline, it works..

        no idea why...

        46
        Basic UserBasic User
        46

          Feb 16, 2005#4

          By me it seems to work just fine. Could you post some
          example of your faulty files.

          the macro I use is this:

          Code: Select all

          SelectLine 
          Copy 
          NextDocument
          Top
          Find "^c"
          IfFound
          SelectLine 
          Else
          PreviousDocument
          EndIf
          
          Regards,

          Alain

          4
          NewbieNewbie
          4

            Feb 16, 2005#5

            hmm.. what version are you using?
            I'm using 11.00

            46
            Basic UserBasic User
            46

              Feb 16, 2005#6

              I'm still in 10.20d+ (I wait a bit before upgrading).
              Never forget: "Above the clouds, The sky is blue and the sun shine"