shutysd

need help about auto chat

9 posts in this topic

#1 ·  Posted (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 :(

#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 by shutysd

Share this post


Link to post
Share on other sites



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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by shutysd

Share this post


Link to post
Share on other sites

 

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.. :x

Share this post


Link to post
Share on other sites

il try this one.. :x

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :(

Share this post


Link to post
Share on other sites

shutysd,

 

i just want to create an auto chat for a game

You 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. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.