good topic for thread is a and z...

so, I have this little script which should give nice little sound every 45-75 seconds.
code:
$s=45
$b=75
$log=@scriptdir+"\ajat.log"

"Running Random beep every $s - $b seconds"
? ? "log is being written to $log"
? "to stop the script press any letter"

$b=$b-$s
run '%comspec% /c echo starting time logging at @time >> "$log"'

do
$=srnd(@msecs)
$sleep=$s+1+rnd($b)
play "0g5000f12d128t5g5000f12d128t"
run '%comspec% /c echo @time >> "$log"' at(5,20) @time
sleep $sleep
until kbhit()

then I check after a while the log and it has:
quote:

starting time logging at 15:32:31
15:32:33
15:33:22
15:34:10
15:34:57
15:35:45
15:36:35
15:37:25
15:38:15
15:39:04

in it...
this means that randomness is only 1-2 seconds.
when it should randomize between 0-30!

is this normal in kix's random generator or is my syntax totally wrong?
_________________________
!

download KiXnet