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

# 🧱块

- [普通块](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/blocks/normal-block.md): 正常块
- [For](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/blocks/for.md): For 是一个用于重复一组操作的语句块，重复次数是预先确定的。这个循环使用一个默认的计数变量 $loopIndex 来跟踪循环进度。
- [While](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/blocks/while.md): While 是一个用于重复执行一组操作的代码块，直到满足某个条件（Condition）才会停止。
- [If, Else if和Else](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/blocks/if-else-if-and-else.md): 这是一个用于根据实际运行条件分支脚本的命令块组。 系统将检查您设置的条件是正确还是错误，而不是从上到下连续运行。
- [条件编写指南](https://docs.gpmautomate.com/automate-zh/cao-zuo-zhi-nan/blocks/writing-conditions.md): 使用条件块如 If、Else if 或 While 时，您需要设置一个条件表达式，以便系统在运行时进行检查。该表达式将返回 真 (true) 或 假 (false)。


---

# 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/blocks.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.
