-
Posts
140 -
Joined
-
Last visited
mrflibblehat's Achievements
-
How can I validate this form using Javascript?
mrflibblehat replied to xBizzet's topic in AutoIt General Help and Support
I imagine e.extension is coming from the js console. the XML error you see is defined in JQuery. Maybe e.extension is. If you go to the site... look at the source, anything related to e.extension or just extension in any of the source script files? in chrome you can also check the network section and js console. -
Return Position of RegEx in String
mrflibblehat replied to adityaparakh's topic in AutoIt General Help and Support
StringRegExp can return more than true or false. Check the optional Flag. https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm If you look at the 4th parameter, "offset", this could be used in a for loop to read line by line. get lines in file. for each line run match with line number in offset if match print line or offset in this case just an idea. There may be a more elegant way to do it Check Reply #2 from jguinch, I haven't used this function in a while. -
Imperial reacted to a post in a topic: Remove text between tags
-
Hi All, I installed Autoit today for the first time in a while (new install of windows) I notice when I press "go" or F5 it will run my code but not INSIDE of scite, it will run it externally. So I am unable to see any debugging (ConsoleWrite) etc. Has anyone had this problem before and knows of a fix? Regards, MrF
-
Hi All, I have not used autoit in quite a while so please forgive me, I've most likely make a simple error. I have created a regexp to grab email addresses from a file. When I try and print it with _Arraydisplay it works, but when I try and print it using $arr[0] it errors on error 1 (invalid) Anyone able to explain what i'm doing incorrectly #include <File.au3> #include <MsgBoxConstants.au3> #include <array.au3> Local $file = FileOpen("sql.txt") Local $lines = _FileCountLines("sql.txt") for $i = 1 to $lines $fline = FileReadLine($file, $i) $str = StringRegExp($fline, "'(.+\@.*?)'", 3) ConsoleWrite($str[0] & @CRLF) Next Thank you for any help provided.
-
fede97 reacted to a post in a topic: Pastebin UDF
-
Fairly Simple Question
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
Thank you for the quick reply -
mrflibblehat reacted to a post in a topic: Fairly Simple Question
-
But due to lack of sleep I cant seem to get my head around it..... Basically everytime I click on a new window be it, chrome, spotify, itunes, I was a new box to come up to say what I can do in that program. Now I am stuck at the first hurdle, how to tell if a window has change, so far I have this but it obviously doesnt work and I feel nowhere close. I have tried to get it to check for a new window every 5 seconds, if its changed, print it to console, if its not changed.. do nothing. Thanks for any help $vOldWindow = 0 While 1 Sleep(5000) CheckWindowChanged() WEnd Func CheckWindowChanged() If Not WinGetTitle("") = $vOldWindow Then ;~ ... Do Stuff here ConsoleWrite(WinGetTitle("")) EndIf $vOldWindow = WinGetTitle("") EndFunc
-
Help With _ArraySearch
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
Tried that which resulted in error 4 4 - $iStart is greater than $iEnd Thanks for the suggestion though. Fixed it now though, my bad, should have done some more reading. $iForward [optional] If set to 0, searches the array from end to beginning (instead of beginning to end) -
Hi All, I have an array as such 1 2 3 4 <--- _ArraySearch is returning the index of this 5 6 7 8 9 1 2 3 4 <--- I am actually looking for this 5 6 7 8 9 When looking for the number 4 using _ArraySearch It will find it at position 3 and give me the index, I am however looking for the index of the second 4 in the sequence. The numbers can be random so it wont always be in that position but basically I am looking for the last 4 in the text file and not the first 4 in the text file. If anyone has any other ideas how I can do this it would be greatly appreciated
-
While Loop Stopping GuiOnEventMode Actions
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
Thank you Melba23, That has worked perfectly- 2 replies
-
- while loop
- gui
-
(and 1 more)
Tagged with:
-
mrflibblehat reacted to a post in a topic: While Loop Stopping GuiOnEventMode Actions
-
Hi All, I am developing an IRC Bot and have come across a small problem. Everything works fine until the ConnectToIRC function is called. This is when a while Loop is in play, I assume this is because the while loop is hogging the program and blocking other commands. so my question, Is there a way around this or a way I could do this differently so that I can receive data when it comes in and also use controls on the gui? If I remove the while loop inside the ConnectToIRC function, Other gui buttons work correctly (Close Button for example) Thanks for any help or insight you may provide. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GUIEdit.au3> #Include <ScrollBarConstants.au3> #include <ComboConstants.au3> #Include <Array.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("AutoIT IRCBot", 537, 339, 192, 124) $Edit1 = GUICtrlCreateEdit("", 8, 8, 521, 257, $ES_AUTOVSCROLL + $WS_VSCROLL) $btnSend = GUICtrlCreateButton("Send", 456, 304, 73, 25) $inIRCServ = GUICtrlCreateInput("irc.freenode.net", 8, 272, 97, 21) $inPort = GUICtrlCreateInput("6667", 112, 272, 65, 21) $inChat = GUICtrlCreateInput("", 288, 304, 161, 21) $btnCon = GUICtrlCreateButton("Connect", 184, 272, 73, 25) $Combo1 = GUICtrlCreateCombo("Channel", 288, 272, 161, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseBot") GUICtrlSetOnEvent($btnCon, "ConnectToIRC") GUICtrlSetOnEvent($btnSend, "IRCSend") GUISetState(@SW_SHOW) TCPStartup() ;~ Read INI Values Global $vIRCNick = IniRead("ircbot.ini", "information", "Nick", "AutoITIRCBot") Global $vIRCAltNick = IniRead("ircbot.ini", "information", "AltNick", "AutoITIRCBot_") Global $vIRCRealName = IniRead("ircbot.ini", "information", "RealName", "AutoITIRCBot") Global $vIRCChannels = IniRead("ircbot.ini", "information", "Channels", "#AutoITIRCBot") $vChanArr = StringSplit($vIRCChannels, "|") While 1 Sleep(100) WEnd Func ConnectToIRC() GUICtrlSetState($btnCon, $GUI_DISABLE) GUICtrlSetState($inIRCServ, $GUI_DISABLE) GUICtrlSetState($inPort, $GUI_DISABLE) $vIRCServer = TCPNameToIP(GuiCtrlRead($inIRCServ)) $vIRCPort = GuiCtrlRead($inPort) $vConnect = TCPConnect($vIRCServer, $vIRCPort) TCPSend($vConnect, "USER " & $vIRCNick & " 0 0 :" & $vIRCRealName & @CRLF) TCPSend($vConnect, "NICK " & $vIRCNick & @CRLF) For $i = 1 to Ubound($vChanArr) -1 TCPSend($vConnect, "JOIN " & $vChanArr[$i] & @CRLF) GUICtrlSetData($Combo1, $vChanArr[$i], $vChanArr[$i]) Next While 1 $vRecv = TCPRecv($vConnect, 4096) If $vRecv <> "" Then GuiCtrlSetData($Edit1, $vRecv, 1) EndIf Wend EndFunc Func CloseBot() Exit EndFunc Ini File [information] Nick=UKTestBot AltNick=UKTestBot_ RealName=UKTestBOT Channels=#test333|#test222
- 2 replies
-
- while loop
- gui
-
(and 1 more)
Tagged with:
-
Its actually not that difficult, I have made a small IRC Bot in AutoIT. You need to use the TCP Functions (TCPConnect, TCPSend & TCPRecv) When connecting to the IRC Server you need to send the following data to the server using TCPSend You can use JOIN to join a channel You can use PRIVMSG to send a message to a channel or to a user. When you receive PING from the server you need to reply with PONG to keep the connection alive Best of luck
-
Reading from traytip
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
I managed to fix this by reading the system event log, I will post the code when i'm done Thank you for your suggestions -
Reading from traytip
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
I still cant seem to match ANY text coming from the traytip or any traytips even ones I invoke myself. -
Reading from traytip
mrflibblehat replied to mrflibblehat's topic in AutoIt General Help and Support
Good Thinking, Tried it out but weirdly enough it didn't show anything when the traytip displayed just a blank msgbox