I have a macro that copies text from a dynamically generated page to the clipboard. After copying the text, I try to use the "Position" command to find a particular "trigger" word.
If this word is present then that initiates a search for a second word whose position MUST be after that of the initial trigger word.
The positions of these words can change given the record displayed on the web page.
Here's an example:
It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way
Let's say the "Trigger Word" would be the 1st instance of "best" and that would kickoff the search for the FIRST instance of "times".
So, the position of best in this instance is 12
The position of times in this instance is 20
I can't get part 1 of the code to work properly. This code for simply finding the position of "best" returns 0.
Code: Select all
WaitClipBoard
wait 0.2
GetClipBoard>text
Separate>text,CRLF,lines
Let>ln=0
Repeat>ln
Let>ln=ln+1
Position>best,lines_%ln%,1,p
Until>ln=lines_count
MDL>%p%
Thanks,
RJ