Jump to content

List help for spammer


Recommended Posts

I'm making this spammer, I just finished getting the gui how I want it but now I have several problems (just started my first GUI today :D )

I don't know how to find out what is selected in $List_1, which is where I want to store my messages; from there highlight them and click SPAM! which will start repeating that message. How would I get this that working? I believe everything else I can figure out on my own.

#NoTrayIcon
#include <GuiConstants.au3>
#include <Misc.au3>

$SpamToggle = 0

GUICreate("Uber Gay Spammer v2", 376, 190, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$List_1 = GUICtrlCreateList         ("Pre-Defined Messages",0,  0,   375, 130, $LBS_DISABLENOSCROLL )
$Combo_ActWin = GuiCtrlCreateCombo  ("Active Windows",      0,  110, 375, 20)
$Button_NPad = GUICtrlCreateButton  ("Notepad",             110,150, 90, 20)
$Input_Mes = GUICtrlCreateInput     ("Input Message",       0,  130, 375, 20)
$Input_Sec = GUICtrlCreateInput     ("Seconds",             55, 150, 55, 19)
$Input_MS = GUICtrlCreateInput      ("Millisec",            0,  150, 55, 19)
$Button_Stop = GUICtrlCreateButton  ("Stop",                200,150, 89, 20)
$Button_SPAM = GUICtrlCreateButton  ("SPAM!",               290,150, 86, 20)
$Button_Add = GUICtrlCreateButton   ("ADD",                 289,170, 87, 20)
$Button_Remove = GUICtrlCreateButton("Remove",              200,170, 89, 20)
$Button_SetDelay = GUICtrlCreateButton("SetDelay",          0,  170, 100, 20)
$Button_Config = GUICtrlCreateButton("Edit Config",         100,  170, 100, 20)
$TotalDelay = (($Input_Sec/1000) + $Input_MS)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button_Add
            GUICtrlSetData($List_1,  GUICtrlRead($Input_Mes))
        Case $msg = $Button_Stop
            $SpamToggle = 0
        Case $msg = $Button_SPAM
            $SpamToggle = 1
        Case $msg = $Button_Remove
            GUICtrlSetData($List_1, "")
        Case $msg = $Button_Config
            Run("config.ini", @WorkingDir) ; I want to put it in a \Data\ folder, but don't know how.
        Case $msg = $Button_NPad
            Run("notepad.exe")
        Case $msg = $TotalDelay
            GUICtrlSetData = (
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            ;;;
    EndSelect
WEnd
Exit

;~ ;==============================================================================================================\
;~ ;***************************************************************************************************************
;~ ;==============================================================================================================\
;~ ;by gamepin126
;~ $sMessage = Inputbox("Message Input", "Input the message to be spammed here.")
;~ $EnterDelay = Inputbox("Message Input", "Input delay between writting the message, and pressing enter(in ms).")
;~ $delay = Inputbox("Delay Input", "Input delay between messages(in ms).")

;~ While 1
;~     If _IsPressed("73") Then Quit(); f3 is pressed
;~  If _IsPressed("74") Then Toggle(); f5 is pressed
;~  If _IsPressed("13") Then _Traytip(); f5 is pressed
;~  If $SpamToggle = 1  Then
;~      Send($sMessage)
;~      Sleep($EnterDelay)
;~      Send("{ENTER}")
;~      Sleep($delay)

;~  EndIf

;~ WEnd

;~ Func _TrayTip()
;~  TrayTip("Uber gay spammer v1",'Hotkeys:' & @LF & 'F4 - Kill spammer' & @LF & 'F5 - Toggle spammer on/off' & @LF & 'PAUSE - Toggles this traytip' & @LF & ' ' & @LF & 'Steps of Use:' & @LF & '1)Enter phrase to spam' & @LF & '2)Enter delay between messages' & @LF & '3)Press F5 to begin spamming' & @LF & '4)Press F5 again to cease' & @LF & '5)Press F4 to kill the program' & @LF & '~gamepin126', 30, 0)
;~  Sleep(200)
;~ EndFunc

;~ Func Toggle()

;~  If $SpamToggle = 0 Then
;~      $SpamToggle = 1
;~      ToolTip("Spammer - ON",0,0)
;~      Sleep(200)
;~  Elseif $SpamToggle = 1 Then
;~      $SpamToggle = 0
;~      ToolTip("Spammer - OFF",0,0)
;~      Sleep(200)
;~  EndIf
;~ EndFunc

;~ Func Quit()
;~  Exit
;~ EndFunc

;~ ;==============================================================================================================\
;~ ;***************************************************************************************************************
;~ ;==============================================================================================================\
Link to comment
Share on other sites

I'm getting this error when I try to use GUICtrlRead:

C:\Program Files\AutoIt3\Scripts\Spam\Spam.au3(40,19) : ERROR: syntax error
            GUICtrlSetData =
            ~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Scripts\Spam\Spam.au3(40,22) : ERROR: unbalanced paranthesis exp[b][/b]ression.
            GUICtrlSetData = (
            ~~~~~~~~~~~~~~~~~~^

#NoTrayIcon
#include <GuiConstants.au3>
#include <Misc.au3>

GUICreate("Uber Gay Spammer v2", 374, 188, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$List_1 = GUICtrlCreateList         ("Pre-Defined Messages",0,  0,   376, 130, $LBS_DISABLENOSCROLL )
$Combo_ActWin = GuiCtrlCreateCombo  ("Active Windows",      0,  108, 376, 20)
$Button_NPad = GUICtrlCreateButton  ("Notepad",             110,148, 90, 20)
$Input_Mes = GUICtrlCreateInput     ("Input Message",       0,  128, 376, 20)
$Input_Sec = GUICtrlCreateInput     ("Seconds",             55, 148, 55, 19)
$Input_MS = GUICtrlCreateInput      ("Millisec",            0,  148, 55, 19)
$Button_Stop = GUICtrlCreateButton  ("Stop",                200,148, 89, 20)
$Button_SPAM = GUICtrlCreateButton  ("SPAM!",               290,148, 86, 20)
$Button_Add = GUICtrlCreateButton   ("ADD",                 289,168, 87, 20)
$Button_Remove = GUICtrlCreateButton("Remove",              200,168, 89, 20)
$Button_SetDelay = GUICtrlCreateButton("SetDelay",          0,  168, 100, 20)
$Button_Config = GUICtrlCreateButton("Edit Config",         100,  168, 100, 20)
$TotalDelay = (($Input_Sec/1000) + $Input_MS)
$message = GUICtrlRead($list_1)
$SpamToggle = 0

GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button_Add
            GUICtrlSetData($List_1,  GUICtrlRead($Input_Mes))
        Case $msg = $Button_Stop
            $SpamToggle = 0
        Case $msg = $Button_SPAM
            $SpamToggle = 1
        Case $msg = $Button_Remove
            GUICtrlSetData($List_1, "")
        Case $msg = $Button_Config
            Run("config.ini", "C:\Program Files\AutoIt3\Scripts\Spam")
        Case $msg = $Button_NPad
            Run("notepad.exe")
        Case $msg = $TotalDelay
            GUICtrlSetData = (
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else

    EndSelect
WEnd

While 1
    If $SpamToggle = 1 Then 
        Spam()
    Else
        Sleep(30)
    EndIf
WEnd

Func Spam()
    Send($message)
    Send("{ENTER}")
    Sleep($TotalDelay)
EndFunc
Edited by gamepin126
Link to comment
Share on other sites

HI,

you are getting the error because of this

GUICtrlSetData = (

:D

Use Scite editor helps finding such mistakes. :D

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Moderators

Your error tells you what your problem is, not the fact that your using GUICtrlRead()... count how many forward parenthesis you have vs. reverse ones and you'll see your problem.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Ugh, this is causing me such a headache. I've been at this for hours, and I just keep getting more lost. I need the combobox to return a list of all the active windows. Any idea how to do that?

All I can get it to do is return a number, but I want window titles in there.

EDIT: I'm also having a real hard time on this remove message thing. It's supposed to delete the selected message from $List_1

#include <GuiConstants.au3>
#include <Misc.au3>

GUICreate("Uber Gay Spammer v2", 375, 188, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$List_1 = GUICtrlCreateList         ("Pre-Defined Messages",0,  0,   375, 130, $LBS_DISABLENOSCROLL )
$ActiveWin = GuiCtrlCreateCombo ("Active Windows",      0,  108, 375, 20, $CBS_DROPDOWN)
$Button_NPad = GUICtrlCreateButton  ("Notepad",             110,148, 90, 20)
$Input_Mes = GUICtrlCreateInput     ("Input Message",       0,  128, 375, 20)
$Input_MS = GUICtrlCreateInput      ("Millisec",            0,  148, 55, 19)
$Button_Stop = GUICtrlCreateButton  ("Stop",                200,148, 89, 20)
$Button_SPAM = GUICtrlCreateButton  ("SPAM!",               290,148, 86, 20)
$Button_Exit = GUICtrlCreateButton("Exit",                  55, 148, 55, 20)
$Button_Add = GUICtrlCreateButton   ("ADD",                 250,168, 125, 20)
$Button_Remove = GUICtrlCreateButton("Remove",              125,168, 125, 20)
$Button_Save = GUICtrlCreateButton("Save",              0,  168, 125, 20)
$SpamToggle = 0
$a = WinList() 
$i = 1
$e = 0
$winlist = GUICtrlSetData($ActiveWin, $a[$e][0])

GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $ActiveWin
            For $i =1 to $a[0][0]
                Do
                GUICtrlSetData($ActiveWin, $a[$i][0])
                Until $i = $a[0][0]
            Next
        Case $msg = $Button_Add
            GUICtrlSetData($List_1,  GUICtrlRead($Input_Mes))
        Case $msg = $Button_Stop
            $SpamToggle = 0
        Case $msg = $Button_SPAM
            $SpamToggle = 1
        Case $msg = $Button_Remove
            $Remove_msg = GUICtrlRead($List_1)
            GUICtrlSetData($Remove_msg, "")
        Case $msg = $Button_Exit
            Exit
        Case $msg = $Button_NPad
            Run("notepad.exe")
    EndSelect
WEnd

While 1
    If ($SpamToggle = 1) AND (WinActive($Window) = 1) Then
        Send($message)
        Send("{ENTER}")
        Sleep($Input_MS)
    Else
        Sleep(300)
    EndIf
WEnd
Edited by gamepin126
Link to comment
Share on other sites

HI,

#include <GuiConstants.au3>
#include <Misc.au3>

GUICreate("Uber Gay Spammer v2", 375, 188, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$List_1 = GUICtrlCreateList("Pre-Defined Messages", 0, 0, 375, 130, $LBS_DISABLENOSCROLL)
$ActiveWin = GUICtrlCreateCombo("Active Windows", 0, 108, 375, 20, $CBS_DROPDOWN)
$Button_NPad = GUICtrlCreateButton("Notepad", 110, 148, 90, 20)
$Input_Mes = GUICtrlCreateInput("Input Message", 0, 128, 375, 20)
$Input_MS = GUICtrlCreateInput("Millisec", 0, 148, 55, 19)
$Button_Stop = GUICtrlCreateButton("Stop", 200, 148, 89, 20)
$Button_SPAM = GUICtrlCreateButton("SPAM!", 290, 148, 86, 20)
$Button_Exit = GUICtrlCreateButton("Exit", 55, 148, 55, 20)
$Button_Add = GUICtrlCreateButton("ADD", 250, 168, 125, 20)
$Button_Remove = GUICtrlCreateButton("Remove", 125, 168, 125, 20)
$Button_Save = GUICtrlCreateButton("Save", 0, 168, 125, 20)
$SpamToggle = 0
$a = WinList()
$i = 1
$e = 0

$winlist = GUICtrlSetData($ActiveWin, $a[$e][0])
Dim $windowArray = WinList()
For $i = 1 To $windowArray[0][0]
; Only display visble windows that have a title
    If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then
        GUICtrlSetData($ActiveWin, $windowArray[$i][0])
    EndIf
Next

GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $ActiveWin
        Case $msg = $Button_Add
            GUICtrlSetData($List_1, GUICtrlRead($Input_Mes))
        Case $msg = $Button_Stop
            $SpamToggle = 0
        Case $msg = $Button_SPAM
            $SpamToggle = 1
        Case $msg = $Button_Remove
            $Remove_msg = GUICtrlRead($List_1)
            GUICtrlSetData($Remove_msg, "")
        Case $msg = $Button_Exit
            Exit
        Case $msg = $Button_NPad
            Run("notepad.exe")
        Case $msg = $GUI_EVENT_CLOSE
            Exit (0)
    EndSelect
WEnd
#cs
    While 1
    If $SpamToggle = 1 AND WinActive($Window) = 1 Then
    Send($message)
    Send("{ENTER}")
    Sleep($Input_MS)
    Else
    Sleep(300)
    EndIf
    WEnd
#ce

put this func in:

Func _winListCombo()
    Dim $windowArray = WinList()
    For $i = 1 To $windowArray[0][0]
    ; Only display visble windows that have a title
        If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then
            GUICtrlSetData($processCombo_C, $windowArray[$i][0])
        EndIf
    Next
EndFunc  ;==>_winListCombo

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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