Keyword: RAND - Random integer

Keywords are used within scripts that enabled powerful features such as dynamic variables, clipboard manipulation, read/write files, mimic inputs and more.
User avatar
YiMeng
Author
Posts: 235
Joined: Sat Jul 18, 2020 10:58 pm
Location: NY
Contact:

Keyword: RAND - Random integer

Unread post by YiMeng »

Description
  • Generates a random integer value between a specified range.

Parameters
  • x: Inclusive minimum integer for the range
  • y: Inclusive maximum integer for the range

Usage
  • To generate a random integer:
    • RAND x, y
  • To retrieve generated random integer:
    • %RAND%
    • SETVAR thisRandom = %RAND%

On Error
  • %RAND% returns -1