shutysd Posted March 26, 2015 Share Posted March 26, 2015 (edited) guys, i need help about creating auto chat looping.. please help i try using notepad as a test, but i dont know how to loop after sending chat2 going to chat 1 again expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("WinTitleMatchMode", 2) #Region ### START GUI section ### Form= $Form1 = GUICreate("Form1", 218, 300, 192, 124) GUICtrlCreateLabel("chat1:",16,6,130,121) $chat1 = GUICtrlCreateInput("", 16, 24, 185, 21) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,57,200,22) $Sleep1 = GUICtrlCreateInput("",16, 75, 185, 21) GUICtrlCreateLabel("chat2:",16, 106, 140, 22) $Pass = GUICtrlCreateInput("", 16, 125, 185, 21,) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,155,200,22) $Sleep2 = GUICtrlCreateInput("",16, 175, 185, 21) $Button1 = GUICtrlCreateButton("Button1", 56, 230, 107, 25) GUISetState(@SW_SHOW) #EndRegion ### END GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run ("Notepad.exe") WinWait("Notepad") For Send("User: " & GUICtrlRead($chat1)) Send("{enter}") Sleep ( GUICtrlRead($Sleep1) ) Send("Password: " & GUICtrlRead($chat2)) Send("{enter}") Sleep ( GUICtrlRead($Sleep2) ) Send ("End") ExitLoop 2 EndSwitch WEnd Edited March 26, 2015 by shutysd Link to comment Share on other sites More sharing options...
water Posted March 26, 2015 Share Posted March 26, 2015 Welcome to AutoIt and the forum! Can you please describe what you want to achieve with this script? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
jdelaney Posted March 26, 2015 Share Posted March 26, 2015 No idea what you want, exactly. This works though: #Region ### START GUI section ### Form= $Form1 = GUICreate("Form1", 218, 300, 192, 124) GUICtrlCreateLabel("chat1:",16,6,130,121) $chat1 = GUICtrlCreateInput("", 16, 24, 185, 21) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,57,200,22) $Sleep1 = GUICtrlCreateInput("",16, 75, 185, 21) GUICtrlCreateLabel("chat2:",16, 106, 140, 22) $chat2 = GUICtrlCreateInput("", 16, 125, 185, 21) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,155,200,22) $Sleep2 = GUICtrlCreateInput("",16, 175, 185, 21) $Button1 = GUICtrlCreateButton("Button1", 56, 230, 107, 25) GUISetState(@SW_SHOW) #EndRegion ### END GUI section ### Run("Notepad.exe") $h = WinWaitActive("[CLASS:Notepad]") Sleep(150) $c = ControlGetHandle($h,"",15) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ControlSetText($h,"",$c,ControlGetText($h,"",$c) & GUICtrlRead($chat1) & @CRLF) ControlSetText($h,"",$c,ControlGetText($h,"",$c) & GUICtrlRead($chat2) & @CRLF) GUICtrlSetData($chat1,"") GUICtrlSetData($chat2,"") EndSwitch WEnd IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
shutysd Posted March 27, 2015 Author Share Posted March 27, 2015 (edited) i just want to create an auto chat for a game, but im trying to test it first on notepad.. i want chat1 and chat2 looped everytime.. Edited March 27, 2015 by shutysd Link to comment Share on other sites More sharing options...
shutysd Posted March 27, 2015 Author Share Posted March 27, 2015 No idea what you want, exactly. This works though: #Region ### START GUI section ### Form= $Form1 = GUICreate("Form1", 218, 300, 192, 124) GUICtrlCreateLabel("chat1:",16,6,130,121) $chat1 = GUICtrlCreateInput("", 16, 24, 185, 21) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,57,200,22) $Sleep1 = GUICtrlCreateInput("",16, 75, 185, 21) GUICtrlCreateLabel("chat2:",16, 106, 140, 22) $chat2 = GUICtrlCreateInput("", 16, 125, 185, 21) GUICtrlCreateLabel("Sleep 1000 millisecond = 1 second",16,155,200,22) $Sleep2 = GUICtrlCreateInput("",16, 175, 185, 21) $Button1 = GUICtrlCreateButton("Button1", 56, 230, 107, 25) GUISetState(@SW_SHOW) #EndRegion ### END GUI section ### Run("Notepad.exe") $h = WinWaitActive("[CLASS:Notepad]") Sleep(150) $c = ControlGetHandle($h,"",15) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ControlSetText($h,"",$c,ControlGetText($h,"",$c) & GUICtrlRead($chat1) & @CRLF) ControlSetText($h,"",$c,ControlGetText($h,"",$c) & GUICtrlRead($chat2) & @CRLF) GUICtrlSetData($chat1,"") GUICtrlSetData($chat2,"") EndSwitch WEnd il try this one.. Link to comment Share on other sites More sharing options...
shutysd Posted March 27, 2015 Author Share Posted March 27, 2015 il try this one.. Ohh! this one work but i want to put a sleep time before chat2 and after chat2 i want to put a sleep time again brfore looping to chat1 and vice versa Link to comment Share on other sites More sharing options...
13lack13lade Posted March 27, 2015 Share Posted March 27, 2015 game botting is not allowed on this forum, you're welcome to read through the help files and other examples on the forum of how certain things are done and then use that knowledge to create things for your own needs. what you are after is not too difficult to create, keep trying and researching and you will figure it out. Link to comment Share on other sites More sharing options...
shutysd Posted March 27, 2015 Author Share Posted March 27, 2015 game botting is not allowed on this forum, you're welcome to read through the help files and other examples on the forum of how certain things are done and then use that knowledge to create things for your own needs. what you are after is not too difficult to create, keep trying and researching and you will figure it out. its only auto chat for selling Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 27, 2015 Moderators Share Posted March 27, 2015 shutysd, i just want to create an auto chat for a gameYou appear not to have read the >Forum rules since your arrival. Please do read them - particularly the bit about not discussing game interaction - before you post again. Thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts