bloC Posted December 29, 2008 Share Posted December 29, 2008 hey, it's me again^^ i wanted my script to scan or check the window if something has changed... for example, when i join a channel in a chat, the frame changes and my script shall recognize it... but i dont know how to do so.... can someone help me? Link to comment Share on other sites More sharing options...
Zedna Posted December 29, 2008 Share Posted December 29, 2008 (edited) While 1 $text = ControlGetText(...) If StringInStr($text, 'some text') > 0 Then ExitLoop Sleep(100) WEnd Edited December 29, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
bloC Posted December 29, 2008 Author Share Posted December 29, 2008 thanks, but the problem is that there is no text... i think $text is based on the control tab in the autoit window info...the only thing that changes is the id and the classname of the frame.... how can i scan that with a script? Link to comment Share on other sites More sharing options...
jvanegmond Posted December 29, 2008 Share Posted December 29, 2008 the only thing that changes is the id and the classname of the frame.... how can i scan that with a script?Use ClassnameNN. github.com/jvanegmond Link to comment Share on other sites More sharing options...
bloC Posted December 29, 2008 Author Share Posted December 29, 2008 While 1 $text = ControlGetText(...) If StringInStr($text, 'some text') > 0 Then ExitLoop Sleep(100) WEnd => While 1 $classname = ControlGetClassname(...) If StringInStr($classname, 'some text') > 0 Then ExitLoop Sleep(100) WEnd i dont think that this is right.....isnt it? Link to comment Share on other sites More sharing options...
Pain Posted December 29, 2008 Share Posted December 29, 2008 (edited) While 1 $text = ControlGetText("Garena", "", "[CLASSNN:RichEdit20W; INSTANCE:2]") If StringInStr($text, 'some text') > 0 Then ExitLoop Sleep(100) WEnd Look at the parameters. Edited December 29, 2008 by Pain Link to comment Share on other sites More sharing options...
bloC Posted December 29, 2008 Author Share Posted December 29, 2008 i dont understand it... the classnn doesnt have any text as you can see in the autoit window info.... so it cant change... Link to comment Share on other sites More sharing options...
Pain Posted December 29, 2008 Share Posted December 29, 2008 There is no ControlGetClassname function as in your example so yes that would fail. Btw try this: ControlFocus("Garena", "", "[CLASS:RichEdit20W; INSTANCE:2]" ) $text = ControlCommand("Garena", "", "[CLASS:RichEdit20W; INSTANCE:2]", "GetSelected", "" ) or "GetLineCount" and loop "GetLine", line#. Link to comment Share on other sites More sharing options...
Zedna Posted December 29, 2008 Share Posted December 29, 2008 For RichEdit control you must use RichEdit UDF.Search forum. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now