> 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/manual/reference/scripting_reference/scripting_events/onscriptfaytcommand.md).

# OnScriptFAYTCommand

The **OnScriptFAYTCommand** event is the entry point for a [script add-in](/directory-opus/manual/scripting/script_add-ins.md) that [extends the FAYT field](/directory-opus/manual/scripting/example_scripts/extending_the_fayt.md). The actual name of the event is defined by the script itself, when the command is added via the [**ScriptInitData**](/directory-opus/manual/reference/scripting_reference/scripting_objects/scriptinitdata.md)**.AddCommand** method - **OnScriptFAYTCommand** is merely a placeholder name.

| **Method Name:**   | OnScriptFAYTCommand                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**ScriptFAYTCommandData**](/directory-opus/manual/reference/scripting_reference/scripting_objects/scriptfaytcommanddata.md)                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Return Type:**   | *none*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Description:**   | <p>When a script extends the FAYT field by adding a new internal command using <strong>ScriptInitData.AddCommand</strong>, it specifies the name of its entry point with the <strong>ScriptCommand.method</strong> property. When the FAYT extension is triggered, Opus will call that method within your script.</p><p>The <a href="/directory-opus/manual/reference/scripting_reference/scripting_objects/scriptfaytcommanddata.md"><strong>ScriptFAYTCommanddata</strong></a> object provides information about what the user has typed to trigger your extension.</p> |
