Sign in to follow this  
Followers 0
ImNewToThis

Help with "starting,exit,spamming action" ^^ <<--noob

5 posts in this topic

hey I'm making a spam program and i need some help :P I need help how to use the start button that i have made, and the exit button, i don't know how make a button work :P,

and i also need help with the spam action, if i want it to spam the text that i Write in the inputs, like if i write BLABLABLA i want it to spam BLABLABLA.

i hope you understand what i mean, quz my english is bad, i know :o

I'm very new to this so please do not flame me :D

#include <GuiConstantsEx.au3>


; Title
GuiCreate("Spammer", 250, 330)



; MENU
GuiCtrlCreateMenu("Spammer")
GuiCtrlCreateMenu("About")
GuiCtrlCreateMenu("Exit")






; menu
$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu);separator
GuiCtrlCreateMenuItem("&Properties", $contextMenu)

; Pic
GuiCtrlCreatePic("images\bäver.jpg",0,155)
GuiCtrlSetColor(-1,0xffffff)

; Text
$text1 = GUICtrlCreateInput("Spam Text 1", 65,15, 155); ----------------------------->How should link this to what im going to spam?
$text2 = GUICtrlCreateInput("Spam Text 2", 65,45) 
$text3 = GUICtrlCreateInput("Spam Text 3", 65,75)
$text4 = GUICtrlCreateInput("Spam Text 4", 65,105) 


; Delay
$delay1 = GuiCtrlCreateInput("5000", 5, 15, 50, 20);----------------------------->And these will be the delay between the spam.
GuiCtrlCreateUpDown(-100)
$delay2 = GuiCtrlCreateInput("5000", 5, 45, 50, 20)
GuiCtrlCreateUpDown(-100)
$delay3 = GuiCtrlCreateInput("5000", 5, 75, 50, 20)
GuiCtrlCreateUpDown(-100)
$delay4 = GuiCtrlCreateInput("5000", 5, 105, 50, 20)
GuiCtrlCreateUpDown(-100)


;Start ??????????

GUICtrlCreateButton("Start", 160,160, 83, 25) ----------------------------->and with this button i want to start the script

GUICtrlCreateButton("Exit", 160,190, 83, 25) ----------------------------->and with this button i want to exit the script



GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Share this post


Link to post
Share on other sites



CODE
While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Or $msg = $Exit Then ;your exit button should say $Exit = guictrlcreatebutton

ExitLoop

EndIf

If $msg = $Start Then ;Same

$Spam = GUICtrlRead($Input) ;like the buttons, everything in a gui should assigned to a variable

EndIf

WEnd

Exit

;you get the idea, right?


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Let me break it down. Line by line.

While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit

Case $Exit
Exit

Case $Start
$Spam = GUICtrlRead($Input)
EndSwitch
WEnd

While 1 Creates a loop to keep the script going.

$msg = GUIGetMsg() Sets GUIGetMsg() to $msg. You use GUIGetMsg() for getting buttons to work.

Switch $msg Selects the variable so that we can work with it

Case $GUI_EVENT_CLOSE Says if we press then do the next line of code

Exit This exits the script.

Case $Exit Says if $msg = $exit Then do the next line of code

Exit Says exit script

Case $Start Says if $msg = $Start Then do next line of code

$Spam = GUICtrlRead($Input) Reds the text inside the input Box

Wend Marks the end of the loop

Now that i have helped you help me by visiting Programming Paradise and registering.

Edited by 2words4uready

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites

Okey thanks very much for your answers, but i can't realy get it work :P, okey i've done it like this--> should i put anything inside Func? or whats wrong :P

#include <GuiConstantsEx.au3>
    
$answer = MsgBox(4, "Start","Start Spammer ?")

; Check the user's answer to the prompt (see the help file for MsgBox return values)
; If "No" was clicked (7) then exit the script
If $answer = 7 Then
    Exit
EndIf



; Title
GuiCreate("Spammer", 250, 330)


; MENY
GuiCtrlCreateMenu("Spammer")
GuiCtrlCreateMenu("About")
GuiCtrlCreateMenu("Exit")



; meny
$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu);separator
GuiCtrlCreateMenuItem("&Properties", $contextMenu)

; bild
GuiCtrlCreatePic("images\bäver.jpg",0,155)
GuiCtrlSetColor(-1,0xffffff)

; Text
$input1 = GUICtrlCreateInput("1", 65,15, 25)
$input2 = GUICtrlCreateInput("2", 65,45)
$input3 = GUICtrlCreateInput("3", 65,75)
$input4 = GUICtrlCreateInput("4", 65,105)


; Delay
$delay1 = GuiCtrlCreateInput("5000", 5, 15, 50, 20)
GuiCtrlCreateUpDown(-100)
$delay2 = GuiCtrlCreateInput("5000", 5, 45, 50, 20)
GuiCtrlCreateUpDown(-100)
$delay3 = GuiCtrlCreateInput("5000", 5, 75, 50, 20)
GuiCtrlCreateUpDown(-100)
$delay4 = GuiCtrlCreateInput("5000", 5, 105, 50, 20)
GuiCtrlCreateUpDown(-100)


;Start ??????????


$Start = GUICtrlCreateButton("Start", 160,160, 83, 25)
$Exit = GUICtrlCreateButton("Exit", 160,190, 83, 25)


;-------------------------------------------------------> Exit does still not work :O should it be inside Func ? or what do i do wrong ? ^^
While (1)
    $msg = GUIGetMsg()
    Switch $msg
        
          case $msg = $GUI_EVENT_CLOSE
        exitLoop
          case $msg  = $Exit
        exitLoop
        
    endSwitch
Wend
;------------------------------------------------------->

GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Share this post


Link to post
Share on other sites

A spam bot is definitely something we do not want posted in these forums.

* click *

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0