Here is your code a bit rewritten...hope you learned with this code some commands and etc.!
just for information:when thereīs a ";" in a line, then everything after this ";" in this line will be ignored
Code:
;Global $Paused ;thereīs a simpler way...
HotKeySet("{F9}", "Pause")
HotKeySet("{F10}", "Close")
HotKeySet("{F8}", "Start")
TrayTip("Credits", "by MrCheater", 0) ; so everyone knows that itīs your program^^
$MESSAGE = InputBox("InputBox", "Type your SPAM! text hier and Press F8 - Start, F9 - Pause, F10 - Close")
$DELAY = InputBox("Delay", "Enter the delay in seconds")
While 1
Sleep(1)
WEnd
Func Pause()
While 1
Sleep(1)
WEnd
EndFunc
Func Close()
Exit ;0 ;you donīt need the 0....
EndFunc
Func Start()
While $DELAY*1000 ;i do that so you can write second and not the milliseconds....and itīs easier..
ControlSend("[CLASS:CLIENT]", "", "Edit1", $MESSAGE) ;it will send the text also when sro is minimized or hidden
ControlSend("[CLASS:CLIENT]", "", "Edit1", "{ENTER}") ;same for enter...
Wend
EndFunc
I donīt mean that your script is nooblike....everyone starts with small and easy scripts.Thats normal. with every script you see you improve your knownledge of Autoit3. My scripts are very complicated and long(mostly about 700 lines...), but i can code in autoit for now 1 year. you WILL be as good as me in some time(depend how much you program) but you have to code and look at codes of others too.
I just made it for YOU to improve YOUR knownledge!
best greetings, lukas !