select -> copy / find whats it clipboard

Help with writing and playing macros

select -> copy / find whats it clipboard

Postby Akyno » Wed Feb 16, 2005 6:19 am

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
User avatar
Akyno
Newbie
 
Posts: 4
Joined: Wed Feb 16, 2005 12:00 am
Location: Frankfurt / Germany

Re: select -> copy / find whats it clipboard

Postby palou » Wed Feb 16, 2005 9:15 am

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,
User avatar
palou
Basic User
Basic User
 
Posts: 47
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: select -> copy / find whats it clipboard

Postby Akyno » Wed Feb 16, 2005 9:58 am

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...
User avatar
Akyno
Newbie
 
Posts: 4
Joined: Wed Feb 16, 2005 12:00 am
Location: Frankfurt / Germany

Re: select -> copy / find whats it clipboard

Postby palou » Wed Feb 16, 2005 10:12 am

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
User avatar
palou
Basic User
Basic User
 
Posts: 47
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: select -> copy / find whats it clipboard

Postby Akyno » Wed Feb 16, 2005 10:34 am

hmm.. what version are you using?
I'm using 11.00
User avatar
Akyno
Newbie
 
Posts: 4
Joined: Wed Feb 16, 2005 12:00 am
Location: Frankfurt / Germany

Re: select -> copy / find whats it clipboard

Postby palou » Wed Feb 16, 2005 11:10 am

I'm still in 10.20d+ (I wait a bit before upgrading).
User avatar
palou
Basic User
Basic User
 
Posts: 47
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland


Return to Macros