help on FindWindowWithText>

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
joe88888
Newbie
Posts: 14
Joined: Wed Nov 22, 2006 4:56 pm

help on FindWindowWithText>

Post by joe88888 » Thu Apr 05, 2007 11:21 pm

hello:
I use GetActiveWindow>window_title,X,Y to get window_title, and use
FindWindowWithText> to find phrase in the window_title, if phrase is found, how to let it go to label>back
thank you!


label>back
FindWindowWithText>sometext,1,window_title,0
if>???? found,back

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Apr 06, 2007 2:27 am

Do you want to find "some text" in the title of the active window? If so this will do it:

GetActiveWindow>window_title,X,Y
Position>some text,window_title,1,pos
If>pos>0,found,notfound

This code puts the title of the active window into the window_title variable, then it looks for "some text" in window_title and then goes to label "found" if it's there, and label "notfound" if it isn't.


FindWindowWithText> searches for text in all windows active or not so I don't think you would want to use it after GetActiveWindow> but I may have misunderstood what you are trying to do...

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