AutoIt
AutoIt
Generating Random Integer in Range
See more PRNG Examples
Demonstrates how to generate random integers in a specified range.Chilkat AutoIt Downloads
Local $bSuccess = False
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$bSuccess = False
$oFortuna = ObjCreate("Chilkat.Prng")
; Generate random integers between 12 and 24 inclusive
Local $i
For $i = 0 To 100
ConsoleWrite($oFortuna.RandomInt(12,24) & @CRLF)
Next