Jump to content

Scan or Check something


bloC
 Share

Recommended Posts

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

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?

Link to comment
Share on other sites

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

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
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...