Hello. I am a beginner with macros and ran into a problem. I was wondering if I am doing something wrong or if this is a bug.
What happens is, if I search for a keyword twice and there is only 1 of them in the document, subsequent Find commands will stop to function.
The actual macro I am using is bigger, but I can demonstrate what is happening with a very simple example:
Example Text:
Hello John.
Hello Ed.
Hello Ed.
Example Macro 1:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "john"
Find "john"
Top
Find "ed"
- Result: It will not be able to find the word Ed.
Example Macro 2:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "ed"
Find "ed"
Top
Find "john"
- Result: This works fine, because there are 2 Eds. Now for something even more puzzling. I will select a piece of text (John) in stead of searching for it directly.
Example Macro 3:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "hello"
Key RIGHT ARROW
StartSelect
Key Ctrl+RIGHT ARROW
EndSelect
Find "^s"
Top
Find "ed"
- Result: Again the Find command stops functioning. The only way to break out of it is by printing some text (and removing it).
Example Macro 4:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "hello"
Key RIGHT ARROW
StartSelect
Key Ctrl+RIGHT ARROW
EndSelect
Find "^s"
"X"
Key BACKSPACE
Top
Find "ed"
- Result: This works fine again.
So can anyone explain to me what is happening? Thanks in advance.
What happens is, if I search for a keyword twice and there is only 1 of them in the document, subsequent Find commands will stop to function.
The actual macro I am using is bigger, but I can demonstrate what is happening with a very simple example:
Example Text:
Hello John.
Hello Ed.
Hello Ed.
Example Macro 1:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "john"
Find "john"
Top
Find "ed"
- Result: It will not be able to find the word Ed.
Example Macro 2:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "ed"
Find "ed"
Top
Find "john"
- Result: This works fine, because there are 2 Eds. Now for something even more puzzling. I will select a piece of text (John) in stead of searching for it directly.
Example Macro 3:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "hello"
Key RIGHT ARROW
StartSelect
Key Ctrl+RIGHT ARROW
EndSelect
Find "^s"
Top
Find "ed"
- Result: Again the Find command stops functioning. The only way to break out of it is by printing some text (and removing it).
Example Macro 4:
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find "hello"
Key RIGHT ARROW
StartSelect
Key Ctrl+RIGHT ARROW
EndSelect
Find "^s"
"X"
Key BACKSPACE
Top
Find "ed"
- Result: This works fine again.
So can anyone explain to me what is happening? Thanks in advance.