Jump to content

Recommended Posts

Posted

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?

Posted

thanks, but the problem is that there is no text... i think $text is based on the control tab in the autoit window info...

Posted Image

the only thing that changes is the id and the classname of the frame.... how can i scan that with a script?

Posted

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?

Posted (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 by Pain
Posted

i dont understand it... the classnn doesnt have any text as you can see in the autoit window info....

so it cant change...

Posted

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#.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...