> 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/default-values.md).

# 📦一些默认变量

### 系统默认变量 (System Variables)

在构建脚本的过程中，GPM Automate 自动提供了一些系统变量。您可以在任何操作中调用这些变量，以获取当前处理的 Profile 或 Excel 数据的信息，而无需手动初始化。

#### 1. Profile 信息变量组

这些变量帮助脚本识别和处理正在运行的每个 Profile Browser 的数据：

* 🆔 `$profileId`: 返回当前打开的 profile 的唯一标识 ID。
* 🏷️ `$profileName`: 返回当前打开的 profile 的显示名称。
* 🌐 `$profileProxy`: 返回当前打开的 profile 正在使用的代理 (IP) 信息。

#### 2. 循环变量组

* 🔄 `$loopIndex`: 返回 For 循环当前的索引 (计数顺序)。此变量在每次循环后自动增加。

#### 3. Excel 数据管理变量组 (`$inputExcel`)

当您的脚本配置使用一个输入 Excel 文件来读取/写入数据时，系统将自动激活以下变量：

* 📂 `$inputExcel`: 代表当前在脚本中链接的输入 Excel 文件。
* 📍 `$inputExcelFileLocation`: 返回输入 Excel 文件在计算机上的确切路径 (File Path)。
* 📊 `$inputExcelTotalRows`: 返回输入 Excel 文件中当前有数据的总行数。
* 🔢 `$inputExcelCurrentRow`: 返回当前正在读取和处理的 Excel 文件中的行号。

> 💡 变量的一般规则：在 GPM Automate 中，所有变量（包括可用的系统变量和您在脚本中自定义命名的变量）都以字符 `$` 开头。


---

# 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/default-values.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.
