Window text gathering experts (you know who you are), what am I doing wrong? From help for GetControlText> "
if the class and instance was not found ##NOSUCHOBJECT## is returned." My problem is that if I open notepad and type in a few words, then run the following script, no matter what number is set for "instance" the notepad text is returned. I would expect that when instance is equal to 2 since there is not a second Edit class, result would be set to
##NOSUCHOBJECT## and the script would finish.
What am I missing?
Thanks for any help,
Dick
Code: Select all
Let>text_k=0
Let>result=
Let>composite_text=
Label>Retrieve_Loop
Add>text_k,1
GetControlText>Notepad*,Edit,%text_k%,Result
If>%result%=##NOSUCHOBJECT##,text_done
If>%text_k%=10,text_done
Concat>composite_text,Item_%text_k%=%TAB%%TAB%%result%%CRLF%
Goto>Retrieve_Loop
Label>text_done
PutClipBoard>%composite_text%