ImNewToThis Posted August 11, 2008 Share Posted August 11, 2008 hey I'm making a spam program and i need some help 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 , 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 I'm very new to this so please do not flame me expandcollapse popup#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 Link to comment Share on other sites More sharing options...
Minikori Posted August 11, 2008 Share Posted August 11, 2008 CODEWhile 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 Link to comment Share on other sites More sharing options...
2words4uready Posted August 12, 2008 Share Posted August 12, 2008 (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 WEndWhile 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 itCase $GUI_EVENT_CLOSE Says if we press then do the next line of codeExit This exits the script.Case $Exit Says if $msg = $exit Then do the next line of codeExit Says exit scriptCase $Start Says if $msg = $Start Then do next line of code$Spam = GUICtrlRead($Input) Reds the text inside the input BoxWend Marks the end of the loopNow that i have helped you help me by visiting Programming Paradise and registering. Edited August 12, 2008 by 2words4uready Link to comment Share on other sites More sharing options...
ImNewToThis Posted August 12, 2008 Author Share Posted August 12, 2008 Okey thanks very much for your answers, but i can't realy get it work , okey i've done it like this--> should i put anything inside Func? or whats wrong expandcollapse popup#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 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 12, 2008 Moderators Share Posted August 12, 2008 A spam bot is definitely something we do not want posted in these forums. * click * Link to comment Share on other sites More sharing options...
Recommended Posts