All pastes #469660 Raw Edit

Something

public text v1 · immutable
·published 2007-05-03 20:59 UTC
rendered paste body
AutoItSetOption("WinDetectHiddenText", 1)
Opt("WinTitleMatchMode", 1)

If WinExists("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3")  Then
    MsgBox(4096, "Test", "Window there, click ok", 10)
    Else
MsgBox(4096, "Test", "ZOMG NO WINDOW< WTFUX? This window suppose to be there", 10)

EndIf

If WinExists("mIRC - [#Talibaals")  Then
    MsgBox(4096, "Test", "Window there, click ok.", 10)
    Else
MsgBox(4096, "Test", "ZOMG NO WINDOW< WTFUX? This window suppose to be there", 10)
EndIf

MsgBox(4096, "Test", "Now reading games", 10)

$ctrltext =  WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "")
While 1
    Sleep(10)
    ;$ctrltext =  WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "")
    If  $ctrltext <> WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "") Then
    $ctrltext =WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "")
        ;MsgBox (0, "Text Added!", "A new line has been added" &@CRLF &$ctrltext)
        $string = StringSplit ($ctrltext, @LF, 1)
        For $n = $string[0] To 1 Step -1
            If StringStripWS($string[$n],4) <> "" Then
               ;MsgBox (0, "Report", "The control has " & $string[0] & " lines." & @CRLF & "Last non-blank line: " & $string[$n])
                 ControlSend("mIRC - [#Talibaals", "", "Edit1", $string[$n])
                 ControlSend("mIRC - [#Talibaals", "", "Edit1", "{ENTER}")
                ExitLoop
            EndIf
        Next
        $ctrltext =  WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "")
    EndIf
WEnd