Jump to content

need help about auto chat


Recommended Posts

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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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.
Link to comment
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

Link to comment
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.

Link to comment
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 :(

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...