lolp1 Posted June 6, 2007 Posted June 6, 2007 (edited) Hello, In a small thing I wrote, I wanted to use a different method to send the messages. Currently I use CrtlSend, how ever I wanted to use something I found from a UDF: _IRCSendMessage ($irc, $msg, $chan="")From : http://www.autoitscript.com/forum/index.ph...=43515&st=0How ever I could not find a way to connect and stay connected, and do the loop to detect a new line (Which that new line will be the message) all in one big loop. Doing this would achieve: Less CPU ussage as I do not have to have another IRC client open.Faster sending, and one less window on my screen..Take away the screen flicker that happens while crtl send is going on.So I need some help on how to do this thanks in advanced, any questions about what I want feel free to post as Its kind of confusing to explain.Note: Refer to the commented lines with crtlsend on them for to make it more clear what I want to do, Here is the code I want to use the different send message method in:expandcollapse popupAutoItSetOption("WinDetectHiddenText", 1) Opt("WinTitleMatchMode", 2) Global $title = "StealthBot v2.6 Revision 3" Global $ctrltext If WinExists($title) 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 - [#baals") 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($title) While 1 Sleep(30) ;$ctrltext = WinGetText("[talibot, online in channel The Void] - StealthBot v2.6 Revision 3", "") If $ctrltext <> WinGetText($title) Then $ctrltext = WinGetText($title) ;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 - [#baals", "", "Edit1","West:" & $string[$n]) ; Here is where I want to ;use_IRCSendMessage ControlSend("mIRC - [#baals", "", "Edit1", "{ENTER}") ; This would be voided. ExitLoop EndIf Next $ctrltext = WinGetText($title) EndIf WEnd MsgBox(0,"","If you see this, you fucked up") Edited June 6, 2007 by lolp1
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