Sample code for 30+ languages & platforms
AutoIt

Generating Random Integer in Range

See more PRNG Examples

Demonstrates how to generate random integers in a specified range.

Chilkat AutoIt Downloads

AutoIt
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