View previous topic :: View next topic
|
Author |
Message |
maridawson
New User
Joined: 24 Jun 2008 Posts: 59 Location: chennai
|
|
|
|
I'm coding a macro to find a specific occurence of a string using find command. Thing is , the string I have to search is some lines above the current cursor position. so I set the cursor position to the first line of the macro and gave a find command to search the string. It is giving a RC '4' , however after the execution of the macro ..... the string that I used to find is highlighted. i dont understand. please help. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Try MacroSpy. It might be useful in such situation.
O. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Show us your macro. |
|
Back to top |
|
|
maridawson
New User
Joined: 24 Jun 2008 Posts: 59 Location: chennai
|
|
|
|
pgm:
string3 string1
string2
macro:
find string1 first
instructions
find string2 next
instructions
find string3 next
instructions.
I am getting a rc of 4 at the third find command. Also i like to know whether it is possible to give 2 different labels for a same line? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
FIND NEXT starts from the current cursor location. Your previous FIND commands have moved the cursor beyond the text you are now looking for.
I suggest using FIND ALL to find it anywhere. OR use two successive FIND instructions. The first may take you to the end of the file and the second will wrap from the top. Or set the cursor to the first list before doing each FIND. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or FIND FIRST ??? |
|
Back to top |
|
|
|