Random Number Generator Topic is solved
Posted: 06 Mar 2018, 23:54
Hello, im new to AHK and i made a first script. Its a basic spamming script
Right now all it does is spam "I'm leveling up!!" in chat but i want to upgrade it so that it chooses random phrase out of 3 (or maybe more if possible) like this i guess, here's a kinda "sketch"
this is what i think it will look like, but ive tired alot of stuff and the script isnt working. I'm sorry if i'm pretty dumb now XD. I basically want the same spam script but make it so that i chooses and random phrase each time. Some help on random number generators will be helpful . Generally, i just want to learn how to do this and some tips for me as a beginner. Thx for the help
- UnderwearDood
Code: Select all
^NumPad1::
$stop := 0
Loop,
{
Clipboard = I'm leveling up!!
sleep 450
send ^v
sleep 500
send {Enter}
Clipboard =
if ($stop)
{
return
}
}
End:: $stop := 1
Code: Select all
^NumPad1::
Random, rand, 1,3
{
if %rand% := 1
Loop
(code)
}
{
if %rand% := 2
Loop
(code)
}
{
if %rand% := 3
Loops
(code)
- UnderwearDood