> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/text-and-number/random-text.md).

# 随机文本

随机文本是指自动生成一串随机字符（包括字母和数字），长度可选，然后将其保存到一个输出变量（Output variable）中。

此操作通常用于在注册账户时生成新密码、创建身份识别码或生成不重复的文本内容，以避免被系统扫描为垃圾邮件。

#### 配置参数：

* 文本长度：您希望生成的随机文本字符串的长度（字符数量）。

#### 实际示例：生成随机密码以自动注册账户

假设您正在编写一个自动注册多个账户的脚本，并需要为每个账户填写一个随机密码以确保安全性：

* 配置方式：您调用随机文本操作，将文本长度设置为 `12`（以生成长度为12个字符的字符串），并将 *Output variable* 设置为 `$randomPassword`。
* 结果：当运行到此步骤时，系统将自动生成一串随机字符串（例如：`"a7K39pXq2wLm"`）并保存到变量 `$randomPassword` 中。在接下来的步骤中，您只需调用按键操作，将变量 `$randomPassword` 传入浏览器的密码输入框，以完成注册。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/text-and-number/random-text.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
