> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/examples-and-recipes.md).

# Examples and Recipes

Twelve worked examples plus a review checklist, from a first toggle to indexed BVAR records.

<figure><img src="https://611779084-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyIhlDMEOMB6JOWTfU9zr%2Fuploads%2FTyim1RxaniXV7y0mnnzT%2Fexamples-and-recipes%20(1).svg?alt=media&amp;token=f16872b6-373f-4fef-a6de-8dce0fba1f1b" alt=""><figcaption></figcaption></figure>

Build complete examples from a first toggle through OLED rendering, combos, state machines, packed storage, and indexed BVAR records.

***

**Work through these pages in order the first time. Return directly to any page later as a reference.**

* [1. Beginner: hair trigger with enable toggle](/gpcscripting/gpc-script-guide/examples-and-recipes/1.-beginner-hair-trigger-with-enable-toggle.md)
* [2. Beginner: platform-selected confirm button](/gpcscripting/gpc-script-guide/examples-and-recipes/2.-beginner-platform-selected-confirm-button.md)
* [3. Beginner: double-press detector](/gpcscripting/gpc-script-guide/examples-and-recipes/3.-beginner-double-press-detector.md)
* [4. Keyboard chord to controller output](/gpcscripting/gpc-script-guide/examples-and-recipes/4.-keyboard-chord-to-controller-output.md)
* [5. Intermediate: one-writer stick pipeline](/gpcscripting/gpc-script-guide/examples-and-recipes/5.-intermediate-one-writer-stick-pipeline.md)
* [6. Intermediate: polar pass-through with controlled rotation](/gpcscripting/gpc-script-guide/examples-and-recipes/6.-intermediate-polar-pass-through-with-controlled-rotation.md)
* [7. Intermediate: validated persistent setting](/gpcscripting/gpc-script-guide/examples-and-recipes/7.-intermediate-validated-persistent-setting.md)
* [8. Advanced: versioned packed SPVAR](/gpcscripting/gpc-script-guide/examples-and-recipes/8.-advanced-versioned-packed-spvar.md)
* [9. Advanced: OLED status card with a custom button badge](/gpcscripting/gpc-script-guide/examples-and-recipes/9.-advanced-oled-status-card-with-a-custom-button-badge.md)
* [10. Advanced: restartable timed combo](/gpcscripting/gpc-script-guide/examples-and-recipes/10.-advanced-restartable-timed-combo.md)
* [11. Advanced: immutable profile table and state machine](/gpcscripting/gpc-script-guide/examples-and-recipes/11.-advanced-immutable-profile-table-and-state-machine.md)
* [12. Expert: indexed BVAR record with round-trip load](/gpcscripting/gpc-script-guide/examples-and-recipes/12.-expert-indexed-bvar-record-with-round-trip-load.md)
* [Sample review checklist](/gpcscripting/gpc-script-guide/examples-and-recipes/sample-review-checklist.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://guide.cronuszen.com/gpcscripting/gpc-script-guide/examples-and-recipes.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.
