> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/scriptcommanddata.zh.md).

# ScriptCommandData

**ScriptCommandData** 对象被传递给任何由 [脚本加载项](/directory-opus/guan-fang-shou-ce/readme.zh-8/readme.zh-1.md) 添加的 [内部命令](/directory-opus/guan-fang-shou-ce/readme.zh-8/readme.zh-6/adding_a_new_internal_command.zh.md) 的脚本定义的入口点。这些事件的函数名由脚本本身定义，但一般称为 [**OnScriptCommand**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh-1/onscriptcommand.zh.md)。

| 属性名称    | 返回类型                                                                                                 | 描述                                                                                                                                                        |
| ------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cmdline | *string*                                                                                             | 此属性返回调用该命令的原始命令行。如果命令行上提供了任何参数，则可以通过 **func.args** 属性以解析后的形式获得。                                                                                           |
| fayt    | <p><em>string</em><br>或 <em>bool</em></p>                                                            | 如果这是一个字符串，则表示它作为 [即时查找扩展](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/scriptfaytcommanddata.zh.md) 命令被调用。如果设置为 **False**，则为普通命令。 |
| func    | *object:*[**Func**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/func.zh.md) | 返回与该函数相关的 [**Func**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/func.zh.md) 对象。它提供了对函数环境（源和目标标签页等）以及任何变量和解析后的命令行参数的访问。          |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/scriptcommanddata.zh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
