Generates random number. (version 4.27 or later)
random <integer variable> <max number>
Generates random integer within the range 0..<max number> and assigns it to <integer variable>. The <max number> has to be greater than 0.
; Variable val will contain integer within the range 0..100. random val 100
; random selection while 1 random val 10 int2str valstr val statusbox valstr 'val' if val=0 then messagebox 'The val is zero.' 'test' elseif val<5 then messagebox 'The val is less than five.' 'test' else messagebox 'The val is greater than five.' 'test' endif endwhile