Shevilie Posted May 14, 2007 Share Posted May 14, 2007 Trolling for UDF list Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Zopieux Posted November 7, 2007 Share Posted November 7, 2007 (edited) Hi, [sorry if I should post in another forum] I have a problem with this scripts. The _IRCPing function is bugging apparently. Here is my output: C:\...\irc.au3(120,14) : WARNING: $irc: possibly used before declaration. TCPSend($irc, ~~~~~~~~~~~~^ C:\...\irc.au3(120,14) : ERROR: $irc: undeclared global variable. TCPSend($irc, ~~~~~~~~~~~~^ You can see my 2 attached files (main is the launcher and irc is the func library). Thanks in advance, Zopieuxmain.au3irc.au3 Edited November 7, 2007 by Zopieux I'm not English, then please excuse my spelling :) Link to comment Share on other sites More sharing options...
McGod Posted November 7, 2007 Author Share Posted November 7, 2007 Replace Func _IRCPing($ret) If $ret = "" Then Return -1 TCPSend($irc, "PONG " & $ret & @CRLF) If @error Then MsgBox(1, "irc.au3", "Server has disconnected.") Return -1 EndIf Return 1 EndFunc with Func _IRCPing($irc, $ret) If $irc = -1 Then Return 0 If $ret = "" Then Return -1 TCPSend($irc, "PONG " & $ret & @CRLF) If @error Then MsgBox(1, "irc.au3", "Server has disconnected.") Return -1 EndIf Return 1 EndFunc [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Zopieux Posted November 7, 2007 Share Posted November 7, 2007 (edited) Ok thanks, I don't have error anymore but now, the script can't connect the server, I get the message "Server has errored or disconnected", whereas the irc.epkinet.org server exists... Is my firewall able to block the connection, maybe? EDIT: it works on another server, like chat.freenode.net... Why? Edited November 7, 2007 by Zopieux I'm not English, then please excuse my spelling :) Link to comment Share on other sites More sharing options...
ilovecui Posted November 21, 2007 Share Posted November 21, 2007 it's show service XX is not respond ,plz tell me why,thanks service=192.168.1.4 name=ilovecui port=6667 Link to comment Share on other sites More sharing options...
BugFix Posted December 7, 2007 Share Posted December 7, 2007 (edited) Hi Chip, thanks for this functions. This works fine. I've added a new one, that allows to send messages as ACTION. Func _IRCSendAction ($irc, $msg, $chan="") If $irc = -1 Then Return 0 If $chan = "" Then TCPSend($irc, $msg & @CRLF) If @error Then MsgBox(1, "IRC.au3", "Server has disconnected.") Return -1 EndIf Return 1 EndIf TCPSend($irc, "PRIVMSG " & $chan & " :" & Chr(1) & "ACTION " & $msg & Chr(1) & @CRLF) If @error Then MsgBox(1, "IRC.au3", "Server has disconnected.") Return -1 EndIf Return 1 EndFuncoÝ÷ Ù±!?Ûwv¢Ø^û§rبÂÞj÷©çzV§u¢´*'ç-ȶ§z0Û¢jez׺Ú"µÍÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÂÈØÜ[ÛX]HHTÈÚ[[È[Y]ÊN ÌÍÚÈHÛØÚÙ]Y[YÛHÒTÐÛÛXÝ BÂBBBBIÌÍÛÙÈHYÜØYÙHÈÙ[Ú]TÜ[Û[È]Z[Y[ ÊNÒTÐÛÛXÝ HÈH[È][YJÊNÛÝXØÙÜÈHBÈÛZ[HHLHHÙØÛÛXÝYÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB[ÈÒTÓX]PÚ[[ ÌÍÚË ÌÍÛÙÏI][ÝÉ][ÝË ÌÍØÚ[I][ÝÉ][ÝÊBRY ÌÍÚÈHLH[]UÔÙ[ ÌÍÚË ][ÝÔT ][ÝÈ [È ÌÍØÚ[ [È ][ÝÈ][ÝÈ [È ÌÍÛÙÈ [ÈÔBBRYÜ[BSÙÐÞ K ][ÝÒTË]LÉ][ÝË ][ÝÔÙÈØÛÛXÝY][ÝÊBBT]LBQ[YT]B[[ÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÂÈØÜ[ÛÛÜÙHHTÈÛÛXÝ[ÛÈ[Y]ÊN ÌÍÚÈHÛØÚÙ]Y[YÛHÒTÐÛÛXÝ BÂBBBBIÌÍÛÙÈHYÜØYÙHÈÙ[Ú]]Z]Ü[Û[ ÝXHÈÙYHÚ][ÛY[ÊBÈ]Z[Y[ ÊNÒTÐÛÛXÝ HÈH[È][YJÊNÛÝXØÙÜÈHBÈÛZ[HHLHHÙØÛÛXÝYÂÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB[ÈÒTÔ]Z] ÌÍÚË ÌÍÛÙÏI][ÝÉ][ÝÊBRY ÌÍÚÈHLH[]UÔÙ[ ÌÍÚË ][ÝÔURU][ÝÈ [È ÌÍÛÙÈ [ÈÔBT]B[[ Edited December 8, 2007 by BugFix Best Regards BugFix Link to comment Share on other sites More sharing options...
cassetti Posted August 31, 2012 Share Posted August 31, 2012 (edited) Thank you!! This is what I needed to build a 'simple' method for allowing 2 scipts to communicate via IRC. I'm currently using this to connect to a personal IRC channel online and send commands to another autoit script with a serial connection to Arduino so I can remotely control my servo. It's not a pretty solution, but I think I can make something work (I would use SMTP/POP protocols, but the delay was too significant for my needs) Also, Thought i'd add my $0.02 to this awesome udf. I added this line to the example.au3 before the WEnd: If StringLen($recv) > 0 Then ToolTip($recv,"" ,"","IRC response",1) This generates an awesome tool-tip that helped me figure out how to use the $recv in my code to receive commands from another script Edited August 31, 2012 by cassetti Link to comment Share on other sites More sharing options...
eawedat Posted August 31, 2012 Share Posted August 31, 2012 --------------------------- AutoIt Error --------------------------- Line 120 (File "C:\Users\User\Desktop\IRC.au3"): TCPSend($irc, "PONG " & $ret & @CRLF) TCPSend(^ ERROR Error: Variable used without being declared. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
BrewManNH Posted September 1, 2012 Share Posted September 1, 2012 TCPSend($irc, "PONG " & $ret & @CRLF)TCPSend(^ ERRORRead this thread, there are at least 2 posts describing this and the fix for it. Try doing a LITTLE work before posting an error report, especially when dealing with a 5 year old thread. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
eawedat Posted September 1, 2012 Share Posted September 1, 2012 BrewManNHI did read but I am still having errorsafter replacement _IRCPING's function and changing the number of arguments (parameters) , I need to change main.au3 so _IRCPING("PONG",) would send two params.what is the second parameter would be ?--------------------------- AutoIt Error --------------------------- Line 18 (File "C:UsersUserDesktopmain.au3"): If $sTemp[1] = "PING" Then _IRCPing($sTemp[2]) If $sTemp[1] = "PING" Then ^ ERROR Error: Incorrect number of parameters in function call. --------------------------- OK --------------------------- 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