GetWindowText question, really easy

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
EnderFFX
Pro Scripter
Posts: 92
Joined: Mon Mar 08, 2004 6:17 am

GetWindowText question, really easy

Post by EnderFFX » Fri Jan 21, 2005 5:27 am

GetWindowText has two parts, the title of the window and the variable for the text that you save, how do you loop through the variable to check out every line gotten by GetWindowText.

GetActiveWindow>wintitle,winX,winY
GetWindowText>%wintitle%,listinfo
Message>%listinfo%

I want to loop through listinfo. I know this is easy and I'm looking for the code as we speak, and I've done it before! Just can't seem to find it.

Thanx everyone.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Jan 21, 2005 8:51 am

Easiest way is to use Separate. The delimiter is CRLF (because each item is on a new line). So:

GetWindowText>WindowTitle,wText
Separate>wText,%CRLF%,texts

Then you have texts_count indicating how many lines there are and for each there will be texts_[1], texts_[2] .... texts_[texts_count]
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts