how can you generate a random number in C++?

  autohotkey, c++

I have this little script in C++ for autohotkey software and I need both sleep number to be random, first from 700 to 900 and the second from 1800 to 2200. Anyone knows how to do it? Thanks! This is the script:

F3::SetTimer, aLoop, % (on:=!on) ? "50" : "Off"

aLoop:
Click down
Sleep, 1400
Click u
Sleep 2000
return

Source: Windows Questions C++

LEAVE A COMMENT