> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 产生随机数

## 指令说明

**描述：** 用于产生随机数，用户自行指定随机数范围的最小数和最大数

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/randomnumbercommand-01.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=fbf4e5d041d237fc4c2fb451051558c9" alt="产生随机数指令参数面板" width="660" height="423" data-path="helpcenter/commands/data-processing/images/randomnumbercommand-01.png" />

    | 参数      | 说明               |
    | ------- | ---------------- |
    | **最小数** | 随机数取值范围的下限（含该数字） |
    | **最大数** | 随机数取值范围的上限（含该数字） |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/randomnumbercommand-03.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=5b2a51baa025e683a5a16c380bfdf150" alt="产生随机数使用示例" width="660" height="423" data-path="helpcenter/commands/data-processing/images/randomnumbercommand-03.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/randomnumbercommand-02.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=db6629a6e73e4a1e5b2c30fb67975ed6" alt="产生随机数使用示例 - 流程搭建" width="937" height="180" data-path="helpcenter/commands/data-processing/images/randomnumbercommand-02.png" />

**该流程执行逻辑：**

1. 设置循环执行 5 次。
2. 每次循环中执行【产生随机数】，在最小值 1 和最大值 999 之间生成一个随机数并保存到变量。
3. 将每次生成的随机数打印到控制台，因此运行结束后可以看到 5 条随机数结果。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/randomnumbercommand-04.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=0ec6d5299df2e62a8aa1bc7ce123a6ef" alt="产生随机数使用示例 - 效果展示" width="918" height="264" data-path="helpcenter/commands/data-processing/images/randomnumbercommand-04.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
