Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v1) • Re: Sleep, % Random Syntax error

$
0
0
Hallo,
try:

CODE:

MsgBox, % (2000, 5000) ; 2000
MsgBox, % Random (2000, 5000) ; 2000

The first 2000 shows that the expression (2000, 5000) has the numerical value 2000.
The second 2000 is the result of the string concatenation of the empty variable Random with 2000,
therefore:

CODE:

MsgBox, % "" 2000 ; 2000


Try:

CODE:

Sleep, % Random(2000, 5000)

Random(Min:="", Max:="")
{
Random OutputVar, %Min%, %Max%
return OutputVar
}

Statistics: Posted by Rohwedder — 13 minutes ago



Viewing all articles
Browse latest Browse all 579

Trending Articles