# Introduction Source: https://docs.simular.ai/agent-s/introduction Welcome to Simular Agent documentation # Agent S: An Open Agentic Framework That Uses Computers Like a Human Welcome to **Agent S**, an open-source framework designed to enable autonomous interaction with computers through an Agent-Computer Interface. Our mission is to build intelligent GUI agents that can learn from past experiences and perform complex tasks autonomously on your computer. Whether you're interested in AI, automation, or contributing to cutting-edge agent-based systems, we're excited to have you here! **Key Features:** * **Autonomous Interaction:** Agents can operate your computer as a human would, interacting with the GUI to accomplish tasks. * **Cross-Platform Support:** Compatible with macOS, Linux, and Windows, ensuring a wide range of usability. * **Extensible Design:** Easily integrate new functionalities and tools to tailor the agents to specific needs. **Getting Started:** **Clone the Repository:** ```bash theme={null} git clone https://github.com/simular-ai/Agent-S.git ``` **Install Dependencies:** ```bash theme={null} pip install . ``` **Run the Framework:** ```bash theme={null} python gui_agents/cli_app.py ``` # Quickstart Source: https://docs.simular.ai/agent-s/quickstart Start running industry leading computer use agents in under 5 minutes Get your docs set up locally for easy development Preview your changes before you push to make sure they're perfect Preview your changes before you push to make sure they're perfect ## πŸ’‘ Introduction Welcome to **Agent S**, an open-source framework designed to enable autonomous interaction with computers through Agent-Computer Interface. Our mission is to build intelligent GUI agents that can learn from past experiences and perform complex tasks autonomously on your computer. Whether you're interested in AI, automation, or contributing to cutting-edge agent-based systems, we're excited to have you here! ## πŸ› οΈ Installation & Setup > ❗**Warning**❗: If you are on a Linux machine, creating a `conda` environment will interfere with `pyatspi`. As of now, there's no clean solution for this issue. Proceed through the installation without using `conda` or any virtual environment. Clone the repository: ```bash theme={null} git clone https://github.com/simular-ai/Agent-S.git ``` Install the gui-agents package: ``` pip install gui-agents ``` Set your LLM API Keys and other environment variables. You can do this by adding the following line to your .bashrc (Linux), or .zshrc (MacOS) file. ```bash theme={null} export OPENAI_API_KEY= ``` Alternatively, you can set the environment variable in your Python script: ```python theme={null} import os os.environ["OPENAI_API_KEY"] = "" ``` We also support Azure OpenAI, Anthropic, and vLLM inference. For more information refer to [models.md](models.md). ### Setup Retrieval from Web using Perplexica Agent S works best with web-knowledge retrieval. To enable this feature, you need to setup Perplexica: 1. Ensure Docker Desktop is installed and running on your system. 2. Navigate to the directory containing the project files. ```bash theme={null} cd Perplexica git submodule update --init ``` 3. Rename the `sample.config.toml` file to `config.toml`. For Docker setups, you need only fill in the following fields: * `OPENAI`: Your OpenAI API key. **You only need to fill this if you wish to use OpenAI's models**. * `OLLAMA`: Your Ollama API URL. You should enter it as `http://host.docker.internal:PORT_NUMBER`. If you installed Ollama on port 11434, use `http://host.docker.internal:11434`. For other ports, adjust accordingly. **You need to fill this if you wish to use Ollama's models instead of OpenAI's**. * `GROQ`: Your Groq API key. **You only need to fill this if you wish to use Groq's hosted models**. * `ANTHROPIC`: Your Anthropic API key. **You only need to fill this if you wish to use Anthropic models**. **Note**: You can change these after starting Perplexica from the settings dialog. * `SIMILARITY_MEASURE`: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.) 4. Ensure you are in the directory containing the `docker-compose.yaml` file and execute: ```bash theme={null} docker compose up -d ``` 5. Our implementation of Agent S incorporates the Perplexica API to integrate a search engine capability, which allows for a more convenient and responsive user experience. If you want to tailor the API to your settings and specific requirements, you may modify the URL and the message of request parameters in `agent_s/query_perplexica.py`. For a comprehensive guide on configuring the Perplexica API, please refer to [Perplexica Search API Documentation](https://github.com/ItzCrazyKns/Perplexica/blob/master/docs/API/SEARCH.md) For a more detailed setup and usage guide, please refer to the [Perplexica Repository](https://github.com/ItzCrazyKns/Perplexica.git). ### Setup Paddle-OCR Server Switch to a new terminal where you will run Agent S. Set the OCR\_SERVER\_ADDRESS environment variable as shown below. For a better experience, add the following line directly to your .bashrc (Linux), or .zshrc (MacOS) file. ```bash theme={null} export OCR_SERVER_ADDRESS=http://localhost:8000/ocr/ ``` Run the ocr\_server.py file code to use OCR-based bounding boxes. ```bash theme={null} cd Agent-S python gui_agents/utils/ocr_server.py ``` You can change the server address by editing the address in [agent\_s/utils/ocr\_server.py](agent_s/utils/ocr_server.py) file. > ❗**Warning**❗: The agent will directly run python code to control your computer. Please use with care. ## πŸš€ Usage ### CLI Run agent\_s on your computer using: ```bash theme={null} agent_s --model gpt-4o ``` This will show a user query prompt where you can enter your query and interact with Agent S. You can use any model from the list of supported models in [models.md](models.md). ### `gui_agents` SDK To deploy Agent S on MacOS or Windows: ```python theme={null} import pyautogui import io from gui_agents.core.AgentS import GraphSearchAgent import platform if platform.system() == "Darwin": from gui_agents.aci.MacOSACI import MacOSACI, UIElement grounding_agent = MacOSACI() elif platform.system() == "Windows": from gui_agents.aci.WindowsOSACI import WindowsACI, UIElement grounding_agent = WindowsACI() elif platform.system() == "Linux": from gui_agents.aci.LinuxOSACI import LinuxACI, UIElement grounding_agent = LinuxACI() else: raise ValueError("Unsupported platform") engine_params = { "engine_type": "openai", "model": "gpt-4o", } agent = GraphSearchAgent( engine_params, grounding_agent, platform="ubuntu", # "macos", "windows" action_space="pyautogui", observation_type="mixed", search_engine="Perplexica" ) # Get screenshot. screenshot = pyautogui.screenshot() buffered = io.BytesIO() screenshot.save(buffered, format="PNG") screenshot_bytes = buffered.getvalue() # Get accessibility tree. acc_tree = UIElement.systemWideElement() obs = { "screenshot": screenshot_bytes, "accessibility_tree": acc_tree, } instruction = "Close VS Code" info, action = agent.predict(instruction=instruction, observation=obs) exec(action[0]) ``` Refer to `cli_app.py` for more details on how the inference loop works. ### OSWorld To deploy Agent S in OSWorld, follow the [OSWorld Deployment instructions](OSWorld.md). ### WindowsAgentArena To deploy Agent S in WindowsAgentArena, follow the [WindowsAgentArena Deployment instructions](WindowsAgentArena.md). ## πŸ™Œ Contributors We’re grateful to all the [amazing people](https://github.com/simular-ai/Agent-S/graphs/contributors) who have contributed to this project. Thank you! πŸ™ ## πŸ’¬ Citation ``` @misc{agashe2024agentsopenagentic, title={Agent S: An Open Agentic Framework that Uses Computers Like a Human}, author={Saaket Agashe and Jiuzhou Han and Shuyu Gan and Jiachen Yang and Ang Li and Xin Eric Wang}, year={2024}, eprint={2410.08164}, archivePrefix={arXiv}, primaryClass={cs.AI}, url={https://arxiv.org/abs/2410.08164}, } ``` # Introduction Source: https://docs.simular.ai/introduction Welcome to Simular developer documentation β€” Sai, Simulang, and Agent S. Welcome to the **Simular** developer documentation. Here you will find guides and references for **scripting with Simulang** and the **Agent S** open-source framework. **[Sai](https://www.simular.ai/sai)** is Simular's **strongest computer-use agent** for when you need maximum capability on real desktop and browser UIs. ## Sai and Agent S ### **1. [Sai](https://www.simular.ai/sai)** **Sai** is Simular's **strongest computer-use agent** β€” our most capable option when you need deep, reliable automation across real desktop and browser UIs. Details, access, and how Sai fits with the rest of the product line are on the **[Sai product page](https://www.simular.ai/sai)**. ### **2. [Agent S](agent-s/introduction)** An **open-source** framework for agents that **control computers like a human** β€” UI, keyboard, and mouse β€” across environments. * Run agents **autonomously** inside many kinds of software. * **Extensible** with custom integrations and tooling. * **Platforms:** **macOS, Linux, and Windows**. *** ## Simulang (scripting) **Simulang** is our layer for scripting desktop automation. This documentation covers **two tracks**; treat them separately: | Track | What it is | Where to start | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | **Latest Simulang** | Standalone **`simulang` CLI**, **`simulang-js`**, and the **`/simulang`** skill in **Claude Code**. | [Simulang Primer](simulang/simulang-primer), then [Simulang with Claude Code](simulang/simulang-claude-code) | | **Simulang v0** | **Legacy** in-app JavaScript-style actions for a **deprecated** desktop automation surface. Kept for reference and migration only. | [Simulang v0 API](simular-pro/simulang), [Simulang v0 examples](simular-pro/examples) | For **new** work, use **Latest Simulang** (primer and Claude Code). Use the **v0** docs only if you still maintain workflows on the legacy in-app surface. Looking for something to read or remix end-to-end? The new **[Simulang Recipes](https://github.com/simular-ai/simulang-recipes)** repo collects community-built automations β€” a 2048 bot, a Wordle solver, a Calendar-to-Docs digest, a TikTok forwarder, and more β€” each one a small, runnable script you can clone and adapt. *** ### Next steps * Read about **[Sai](https://www.simular.ai/sai)** for Simular's strongest computer-use agent. * Choose your **Simulang** track from the table above (prefer latest for new projects). * Browse the **[Simulang Recipes](https://github.com/simular-ai/simulang-recipes)** repo for runnable, end-to-end automations to clone and remix. * Explore **[Agent S](agent-s/introduction)** to build or extend open-source computer-use agents. * Join the community via **Discord** and **GitHub** in the header when you want help or to contribute. For more detail, use the sidebar: **Getting Started**, **Simulang**, **Simular** (legacy Simulang v0 reference), and **Agent S**. # AccessibilityNode Source: https://docs.simular.ai/simulang-js/api/latest/classes/AccessibilityNode # Class: AccessibilityNode Defined in: [index.d.ts:14](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L14) A node in the platform accessibility tree. Thin binding for `simulang_rs::AXNode` (macOS `AXUIElement` / Windows UIA element / Linux AT-SPI accessible). Construct via the static factories or via tree-walking methods on another node / `Instance` / `Window` (`children`, `find`, `scoredSearch`). Properties are resolved from the underlying accessibility framework on each access; the node itself is just a handle. ## Constructors ### Constructor > **new AccessibilityNode**(): `AccessibilityNode` #### Returns `AccessibilityNode` ## Accessors ### automationId #### Get Signature > **get** **automationId**(): `string` Defined in: [index.d.ts:41](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L41) UIA `AutomationId` (Windows). Empty on macOS / Linux. ##### Returns `string` *** ### className #### Get Signature > **get** **className**(): `string` Defined in: [index.d.ts:24](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L24) Platform class name (Windows UIA `ClassName` / macOS subrole). ##### Returns `string` *** ### controlType #### Get Signature > **get** **controlType**(): `number` Defined in: [index.d.ts:26](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L26) Numeric control type (`UIA_ControlTypeIds` on Windows, `0` on macOS). ##### Returns `number` *** ### description #### Get Signature > **get** **description**(): `string` Defined in: [index.d.ts:30](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L30) Short description (`AXDescription` / UIA `Name`-adjacent fields). ##### Returns `string` *** ### helpText #### Get Signature > **get** **helpText**(): `string` Defined in: [index.d.ts:37](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L37) Help text / tooltip. ##### Returns `string` *** ### isEnabled #### Get Signature > **get** **isEnabled**(): `boolean` Defined in: [index.d.ts:43](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L43) Whether the node accepts user input. ##### Returns `boolean` *** ### localizedControlType #### Get Signature > **get** **localizedControlType**(): `string` Defined in: [index.d.ts:28](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L28) Localized control type string. ##### Returns `string` *** ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:22](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L22) Accessible name (title / label). ##### Returns `string` *** ### overallDescription #### Get Signature > **get** **overallDescription**(): `string` Defined in: [index.d.ts:35](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L35) Synthetic, query-friendly description used by `scoredSearch` (combines the node's role, label, value, and a small amount of ancestor context). ##### Returns `string` *** ### role #### Get Signature > **get** **role**(): [`AriaRole`](../enumerations/AriaRole.mdx) Defined in: [index.d.ts:20](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L20) Cross-platform ARIA role. ##### Returns [`AriaRole`](../enumerations/AriaRole.mdx) *** ### value #### Get Signature > **get** **value**(): `string` Defined in: [index.d.ts:39](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L39) Current text value (textbox content, slider value as string, …). ##### Returns `string` ## Methods ### activate() > **activate**(): `void` Defined in: [index.d.ts:92](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L92) Invoke / click the element (button, link, menu item). #### Returns `void` *** ### boundingBox() > **boundingBox**(): [`BoundingBox`](../interfaces/BoundingBox.mdx) Defined in: [index.d.ts:48](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L48) Live bounding box of the element in global physical pixels. `right` and `bottom` are exclusive (Playwright / DOM convention). #### Returns [`BoundingBox`](../interfaces/BoundingBox.mdx) *** ### children() > **children**(): `AccessibilityNode`\[] Defined in: [index.d.ts:54](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L54) Direct child nodes. Returns an empty array if the subtree has been torn down or the children attribute is unreadable (matching simulang-rs's convention of treating walk failures as "no children"). #### Returns `AccessibilityNode`\[] *** ### expandCollapse() > **expandCollapse**(): `void` Defined in: [index.d.ts:100](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L100) Expand or collapse a dropdown or tree item. #### Returns `void` *** ### focus() > **focus**(): `void` Defined in: [index.d.ts:107](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L107) Move keyboard focus to this element (brings its window to the foreground as a side effect on most platforms). #### Returns `void` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): `AccessibilityNode`\[] Defined in: [index.d.ts:90](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L90) Search this subtree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Returns every node whose score equals the maximum found and exceeds `threshold` β€” same semantics as `simulang_rs::scored_search` with `BowJaccard::score(...).primary` as the scorer and a permissive filter. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns `AccessibilityNode`\[] *** ### scrollIntoView() > **scrollIntoView**(): `void` Defined in: [index.d.ts:102](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L102) Scroll the element into view. #### Returns `void` *** ### select() > **select**(): `void` Defined in: [index.d.ts:98](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L98) Select a tab, radio button, or list item. #### Returns `void` *** ### setValue() > **setValue**(`value`): `void` Defined in: [index.d.ts:94](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L94) Set the text value of the element (textbox, combobox, …). #### Parameters ##### value `string` #### Returns `void` *** ### snapshot() > **snapshot**(): `string` Defined in: [index.d.ts:64](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L64) Render this node's accessibility subtree as an indented Playwright-style aria snapshot string. One line per node, two spaces of indentation per depth level, in pre-order DFS. Roles are emitted raw (`AXWindow` on macOS, `UIA.ControlType.*` on Windows), with title and value appended when non-empty. #### Returns `string` *** ### supportedActions() > **supportedActions**(): `string`\[] Defined in: [index.d.ts:69](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L69) Human-readable names of the actions this node currently supports (e.g. `"activate"`, `"toggle"`, `"scroll_into_view"`). #### Returns `string`\[] *** ### toggle() > **toggle**(): `void` Defined in: [index.d.ts:96](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L96) Toggle a checkbox or switch. #### Returns `void` *** ### fromFocusedApplication() > `static` **fromFocusedApplication**(): `AccessibilityNode` Defined in: [index.d.ts:16](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L16) Root node of the currently focused application's accessibility tree. #### Returns `AccessibilityNode` *** ### fromPid() > `static` **fromPid**(`pid`): `AccessibilityNode` Defined in: [index.d.ts:18](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L18) Root node of the application identified by `pid`. #### Parameters ##### pid `number` #### Returns `AccessibilityNode` # AccessibilityTree Source: https://docs.simular.ai/simulang-js/api/latest/classes/AccessibilityTree # Class: AccessibilityTree Defined in: [index.d.ts:114](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L114) Accessibility tree bound to a specific window. Provides snapshot and ref-based actions for desktop automation (Windows UIA). ## Constructors ### Constructor > **new AccessibilityTree**(): `AccessibilityTree` #### Returns `AccessibilityTree` ## Accessors ### windowId #### Get Signature > **get** **windowId**(): `number` Defined in: [index.d.ts:127](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L127) Get the window handle as an integer ID. ##### Returns `number` *** ### windowTitle #### Get Signature > **get** **windowTitle**(): `string` Defined in: [index.d.ts:125](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L125) Get the window title. ##### Returns `string` ## Methods ### activate() > **activate**(`refId`): `void` Defined in: [index.d.ts:145](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L145) Invoke/click an element (button, link, menuitem). #### Parameters ##### refId `number` #### Returns `void` *** ### clearRefs() > **clearRefs**(): `void` Defined in: [index.d.ts:163](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L163) Clear all stored element refs. #### Returns `void` *** ### expandCollapse() > **expandCollapse**(`refId`): `void` Defined in: [index.d.ts:153](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L153) Expand or collapse a dropdown or tree item. #### Parameters ##### refId `number` #### Returns `void` *** ### find() > **find**(`order`, `role?`, `name?`, `visibleOnly?`, `maxResults?`, `collapseStructural?`): [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx)\[] Defined in: [index.d.ts:186](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L186) Search the tree using the chosen traversal order. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `role` – keep nodes whose ARIA role equals this value (e.g. `AriaRole.Button`, `AriaRole.TabList`, `AriaRole.MenuBar`). Cross-platform ARIA roles, not the platform-native `UIA.ControlType.*` / `AX*` / `AT-SPI.Role.*` vocabulary. * `name` – keep nodes whose title or description contains this string * `visible_only` – skip invisible nodes (default `false`) * `max_results` – stop after this many matches (uses `.take()`) * `collapse_structural` – hoist empty structural wrappers (for example `Pane` / `Group` / `Custom` / `Document` on Windows, `AXGroup` / `AXGenericGroup` / `AXUnknown` on macOS, AT-SPI `Panel` / `Filler` / `Section` on Linux) out of the walk so role searches do not hit unnamed containers (default `false`) Clears existing refs; returned nodes carry `refId` values usable with action methods (`activate`, `setValue`, …). #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### role? [`AriaRole`](../enumerations/AriaRole.mdx) | `null` ##### name? `string` | `null` ##### visibleOnly? `boolean` | `null` ##### maxResults? `number` | `null` ##### collapseStructural? `boolean` | `null` #### Returns [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx)\[] *** ### focusElement() > **focusElement**(`refId`): `void` Defined in: [index.d.ts:157](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L157) Focus an element (brings window to foreground). #### Parameters ##### refId `number` #### Returns `void` *** ### getBounds() > **getBounds**(`refId`): [`BoundingBox`](../interfaces/BoundingBox.mdx) Defined in: [index.d.ts:159](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L159) Get the live bounding box of an element. #### Parameters ##### refId `number` #### Returns [`BoundingBox`](../interfaces/BoundingBox.mdx) *** ### getSupportedActions() > **getSupportedActions**(`refId`): `string`\[] Defined in: [index.d.ts:161](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L161) Get the list of supported actions for an element. #### Parameters ##### refId `number` #### Returns `string`\[] *** ### scrollIntoView() > **scrollIntoView**(`refId`): `void` Defined in: [index.d.ts:155](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L155) Scroll an element into view. #### Parameters ##### refId `number` #### Returns `void` *** ### select() > **select**(`refId`): `void` Defined in: [index.d.ts:151](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L151) Select a tab, radio button, or list item. #### Parameters ##### refId `number` #### Returns `void` *** ### setValue() > **setValue**(`refId`, `value`): `void` Defined in: [index.d.ts:147](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L147) Set the text value of an element (textbox, combobox). #### Parameters ##### refId `number` ##### value `string` #### Returns `void` *** ### snapshot() > **snapshot**(`visibleOnly?`): [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx) Defined in: [index.d.ts:143](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L143) Take a snapshot of the window's accessibility tree. `visible_only` (default `false`) controls whether nodes whose non-standard `AXVisible` attribute reads `false` are dropped from the result. `AXVisible` is a Chromium-specific extension; native macOS apps don't expose it, so the filter only matters for browser windows. Chrome reports many web-content nodes (including `AXLink`) as `AXVisible=false` because its accessibility-tree visibility is compositor-driven, not pixel-driven β€” setting `visible_only=true` on a Chrome window will silently drop most of the page including links. #### Parameters ##### visibleOnly? `boolean` | `null` #### Returns [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx) *** ### toggle() > **toggle**(`refId`): `void` Defined in: [index.d.ts:149](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L149) Toggle a checkbox or switch. #### Parameters ##### refId `number` #### Returns `void` *** ### fromForeground() > `static` **fromForeground**(): `AccessibilityTree` Defined in: [index.d.ts:116](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L116) Create an accessibility tree bound to the current foreground window. #### Returns `AccessibilityTree` *** ### fromHwnd() > `static` **fromHwnd**(`hwnd`): `AccessibilityTree` Defined in: [index.d.ts:123](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L123) Create an accessibility tree from a platform-specific window identifier. On Windows this is an HWND; on macOS it is a PID. #### Parameters ##### hwnd `number` #### Returns `AccessibilityTree` *** ### fromPid() > `static` **fromPid**(`pid`): `AccessibilityTree` Defined in: [index.d.ts:118](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L118) Create an accessibility tree bound to the first visible window of a process. #### Parameters ##### pid `number` #### Returns `AccessibilityTree` # App Source: https://docs.simular.ai/simulang-js/api/latest/classes/App # Class: App Defined in: [index.d.ts:190](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L190) Represents an application that can be opened. ## Constructors ### Constructor > **new App**(): `App` #### Returns `App` ## Accessors ### canonicalName #### Get Signature > **get** **canonicalName**(): `string` | `null` Defined in: [index.d.ts:194](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L194) Returns the canonical app name used for fuzzy matching. ##### Returns `string` | `null` *** ### launchTarget #### Get Signature > **get** **launchTarget**(): `string` | `null` Defined in: [index.d.ts:196](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L196) Returns the launch target used to open the app (name or path). ##### Returns `string` | `null` ## Methods ### open() > **open**(`url`, `focusPolicy`, `visibility`, `waitForLoadComplete`): [`Instance`](Instance.mdx) Defined in: [index.d.ts:217](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L217) Opens or switches to an application. If a URL is provided, the URL is opened with the specified app. `focus_policy` controls whether the app is allowed to become active/frontmost. Some applications (e.g. Chrome, Notes) ignore this request and steal focus regardless. `visibility` controls whether the app is launched hidden or shown. Some applications (e.g. Chrome and other Chromium/Electron apps) ignore the hidden flag and launch visibly, potentially stealing focus. In that case the app is hidden explicitly after launch. When `wait_for_load_complete` is true, this blocks for a short, fixed delay to allow the app or URL to become responsive before returning. #### Parameters ##### url `string` | `null` | `undefined` ##### focusPolicy [`FocusPolicy`](../enumerations/FocusPolicy.mdx) ##### visibility [`Visibility`](../enumerations/Visibility.mdx) ##### waitForLoadComplete `boolean` #### Returns [`Instance`](Instance.mdx) *** ### defaultBrowser() > `static` **defaultBrowser**(): `App` Defined in: [index.d.ts:198](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L198) Returns a handle to the system's default browser. #### Returns `App` *** ### exactName() > `static` **exactName**(`name`): `App` Defined in: [index.d.ts:192](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L192) Get the app by exact name. No fuzzy search is performed. #### Parameters ##### name `string` #### Returns `App` *** ### exists() > `static` **exists**(`app`): `boolean` Defined in: [index.d.ts:200](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L200) Checks if the app exists. #### Parameters ##### app `string` #### Returns `boolean` # AskModel Source: https://docs.simular.ai/simulang-js/api/latest/classes/AskModel # Class: AskModel Defined in: [index.d.ts:229](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L229) A free-form chat-completions LLM (optionally vision-capable) β€” the JS analogue of the `ask` primitive. Given a `prompt`, optional accessibility/structural `text`, and zero or more `images`, \[`AskModel.ask`] returns the model's response as a plain string. The wire format is OpenAI-compatible chat completions, so any provider config that points at such an endpoint works. ## Constructors ### Constructor > **new AskModel**(): `AskModel` #### Returns `AskModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:250](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L250) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### ask() > **ask**(`prompt`, `text?`, `images?`): `string` Defined in: [index.d.ts:264](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L264) Ask the model a question, optionally grounded in accessibility text and/or images. * `prompt`: the question or task to answer. * `text`: optional accessibility-tree (or any) text included as structural context. Pass `null` / omit to skip. * `images`: zero or more images to attach. Each is encoded as a base64 data URL and sent as an `image_url` chat content part. Pass `null` / omit for none. Returns the trimmed assistant response on success. #### Parameters ##### prompt `string` ##### text? `string` | `null` ##### images? [`Image`](Image.mdx)\[] | `null` #### Returns `string` *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:248](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L248) Every LLM model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files) advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `AskModel` Defined in: [index.d.ts:241](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L241) Resolve a model alias against the loaded config (e.g. `"openrouter_gpt_4o_mini"` from the bundled `openrouter` provider, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `AskModel` *** ### default() > `static` **default**(): `AskModel` Defined in: [index.d.ts:235](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L235) First LLM model advertised by the first LLM-capable provider in the loaded configuration whose credentials are currently available. Throws if no provider in the loaded config advertises an LLM service. #### Returns `AskModel` # AudioOutput Source: https://docs.simular.ai/simulang-js/api/latest/classes/AudioOutput # Class: AudioOutput Defined in: [index.d.ts:272](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L272) Handle to an open audio output device. Must be kept alive for playback to continue β€” when dropped all associated `Player`s stop producing sound. ## Constructors ### Constructor > **new AudioOutput**(): `AudioOutput` #### Returns `AudioOutput` ## Methods ### createPlayer() > **createPlayer**(): [`Player`](Player.mdx) Defined in: [index.d.ts:281](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L281) Creates a new `Player` attached to this output. #### Returns [`Player`](Player.mdx) *** ### openDefault() > `static` **openDefault**(): `AudioOutput` Defined in: [index.d.ts:279](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L279) Opens the default audio output device with its default configuration. If that fails, tries alternative configurations and non-default output devices. Returns the first configuration that succeeds. If all attempts fail, returns the initial error. #### Returns `AudioOutput` # Clipboard Source: https://docs.simular.ai/simulang-js/api/latest/classes/Clipboard # Class: Clipboard Defined in: [index.d.ts:285](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L285) Contains functions to read and write the clipboard. ## Constructors ### Constructor > **new Clipboard**(): `Clipboard` Defined in: [index.d.ts:286](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L286) #### Returns `Clipboard` ## Methods ### clear() > **clear**(): `void` Defined in: [index.d.ts:321](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L321) Clears all content from the clipboard, regardless of type. #### Returns `void` *** ### getImage() > **getImage**(): [`Image`](Image.mdx) | `null` Defined in: [index.d.ts:300](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L300) Gets the image content from the clipboard. Returns the clipboard image if available, or `null` if the clipboard doesn't contain image data. #### Returns [`Image`](Image.mdx) | `null` *** ### getString() > **getString**(): `string` | `null` Defined in: [index.d.ts:293](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L293) Gets the string content from the clipboard. Returns the clipboard string if available, or `null` if the clipboard doesn't contain string data or is empty. #### Returns `string` | `null` *** ### pasteText() > **pasteText**(`value`): `void` Defined in: [index.d.ts:332](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L332) Types text by pasting it from the clipboard. Saves the previous clipboard text and image (when present), sets the clipboard to the specified string, verifies it was set correctly, then simulates Command+V (or Ctrl+V) to paste it. After pasting, reapplies the saved snapshot (image is restored in preference to text when both were present). Other clipboard formats are not saved or restored. #### Parameters ##### value `string` #### Returns `void` *** ### setImage() > **setImage**(`image`): `string` | `null` Defined in: [index.d.ts:319](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L319) Replaces the contents of the clipboard with the given image. For example used to copy a screenshot to the clipboard. Returns the previous string content, or `null` if the clipboard was empty or had no string data. The clipboard is not automatically restored; the caller can use the returned value to restore it if desired. #### Parameters ##### image [`Image`](Image.mdx) #### Returns `string` | `null` *** ### setString() > **setString**(`value`): `string` | `null` Defined in: [index.d.ts:309](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L309) Replaces the contents of the clipboard with the given string. Returns the previous string content, or `null` if the clipboard was empty or had no string data. The clipboard is not automatically restored; the caller can use the returned value to restore it if desired. #### Parameters ##### value `string` #### Returns `string` | `null` # Directory Source: https://docs.simular.ai/simulang-js/api/latest/classes/Directory # Class: Directory Defined in: [index.d.ts:336](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L336) Represents a directory handle. ## Constructors ### Constructor > **new Directory**(`path`, `createMissing`): `Directory` Defined in: [index.d.ts:344](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L344) Creates a handle to a directory at the given path. If `create_missing` is true, the directory (and all missing ancestors) is created when it does not already exist. If false, the call fails when the directory does not exist. #### Parameters ##### path `string` ##### createMissing `boolean` #### Returns `Directory` ## Methods ### copyTo() > **copyTo**(`dest`): `Directory` Defined in: [index.d.ts:356](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L356) Copies the directory recursively to a new location. #### Parameters ##### dest `string` #### Returns `Directory` *** ### delete() > **delete**(): `void` Defined in: [index.d.ts:363](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L363) Deletes the directory recursively, invalidating the handle. #### Returns `void` *** ### isReadonly() > **isReadonly**(): `boolean` Defined in: [index.d.ts:384](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L384) Returns whether the directory is read-only. #### Returns `boolean` *** ### listDirs() > **listDirs**(): `Directory`\[] Defined in: [index.d.ts:375](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L375) Returns all subdirectories in this directory (non-recursive). Throws if any individual directory entry fails to read. #### Returns `Directory`\[] *** ### listFiles() > **listFiles**(): [`File`](File.mdx)\[] Defined in: [index.d.ts:369](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L369) Returns all files in this directory (non-recursive). Throws if any individual directory entry fails to read. #### Returns [`File`](File.mdx)\[] *** ### modified() > **modified**(): `number` Defined in: [index.d.ts:382](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L382) Returns the last modification time of the directory itself as milliseconds since the Unix epoch. #### Returns `number` *** ### moveTo() > **moveTo**(`dest`): `void` Defined in: [index.d.ts:361](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L361) Moves the directory to a new location Falls back to copy + delete for cross-device moves. #### Parameters ##### dest `string` #### Returns `void` *** ### name() > **name**(): `string` Defined in: [index.d.ts:377](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L377) Returns the directory name (last component of the path). #### Returns `string` *** ### path() > **path**(): `string` Defined in: [index.d.ts:352](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L352) Returns the resolved absolute path. #### Returns `string` *** ### rename() > **rename**(`newName`): `void` Defined in: [index.d.ts:354](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L354) Renames the directory in place (same parent directory) #### Parameters ##### newName `string` #### Returns `void` *** ### temp() > `static` **temp**(): `Directory` Defined in: [index.d.ts:350](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L350) Creates a directory with a unique name inside the system's temp directory, returning a handle to it. The directory is **not** automatically removed; call `delete()` when done. #### Returns `Directory` # File Source: https://docs.simular.ai/simulang-js/api/latest/classes/File # Class: File Defined in: [index.d.ts:388](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L388) Represents a file handle. ## Constructors ### Constructor > **new File**(`path`, `createMissing`): `File` Defined in: [index.d.ts:396](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L396) Creates a handle to a file at the given path. If `create_missing` is true, the file (and all missing parent directories) is created when it does not already exist. If false, the call fails when the file does not exist. #### Parameters ##### path `string` ##### createMissing `boolean` #### Returns `File` ## Methods ### copyTo() > **copyTo**(`dest`): `File` Defined in: [index.d.ts:412](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L412) Copies the file to a new location, returning a handle to the copy. #### Parameters ##### dest `string` #### Returns `File` *** ### delete() > **delete**(): `void` Defined in: [index.d.ts:419](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L419) Deletes the file, invalidating the handle. #### Returns `void` *** ### extension() > **extension**(): `string` | `null` Defined in: [index.d.ts:423](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L423) Returns the file extension, if any. #### Returns `string` | `null` *** ### isReadonly() > **isReadonly**(): `boolean` Defined in: [index.d.ts:432](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L432) Returns whether the file is read-only. #### Returns `boolean` *** ### modified() > **modified**(): `number` Defined in: [index.d.ts:430](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L430) Returns the last modification time as milliseconds since the Unix epoch. #### Returns `number` *** ### moveTo() > **moveTo**(`dest`): `void` Defined in: [index.d.ts:417](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L417) Moves the file to a new location. Falls back to copy + delete for cross-device moves. #### Parameters ##### dest `string` #### Returns `void` *** ### name() > **name**(): `string` Defined in: [index.d.ts:421](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L421) Returns the file name (last component of the path). #### Returns `string` *** ### path() > **path**(): `string` Defined in: [index.d.ts:398](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L398) Returns the resolved absolute path. #### Returns `string` *** ### read() > **read**(): `string` Defined in: [index.d.ts:400](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L400) Reads the file and returns its trimmed contents. #### Returns `string` *** ### rename() > **rename**(`newName`): `void` Defined in: [index.d.ts:410](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L410) Renames the file in place (same parent directory). #### Parameters ##### newName `string` #### Returns `void` *** ### size() > **size**(): `number` Defined in: [index.d.ts:425](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L425) Returns the file size in bytes. #### Returns `number` *** ### write() > **write**(`content`, `append`): `void` Defined in: [index.d.ts:408](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L408) Writes content to the file. When `append` is true and the file already has content, a newline is inserted before appending. When `append` is false, the file is overwritten. Parent directories are created if needed. #### Parameters ##### content `string` ##### append `boolean` #### Returns `void` # GroundingModel Source: https://docs.simular.ai/simulang-js/api/latest/classes/GroundingModel # Class: GroundingModel Defined in: [index.d.ts:436](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L436) A visual-language grounding model that can locate concepts on images. ## Constructors ### Constructor > **new GroundingModel**(): `GroundingModel` #### Returns `GroundingModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:466](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L466) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### ground() > **ground**(`target`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:480](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L480) Locate `concept` on `target` and return zero-based pixel coordinates `[x, y]`: * If `target` is an `Image`, coordinates are in **image-space**. Normalized model outputs are scaled linearly onto `[0, width - 1]` and `[0, height - 1]`. * If `target` is a `Screenshot`, coordinates are in **global physical screen space** β€” suitable to feed directly into primitives that expect global screen coordinates (e.g. `moveTo`, `clickAt`). Equivalent to `target.ground(model, concept)`. #### Parameters ##### target [`Image`](Image.mdx) | [`Screenshot`](Screenshot.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:464](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L464) Every VLM model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `GroundingModel` Defined in: [index.d.ts:448](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L448) Resolve a model alias against the loaded config (e.g. `"ui_venus_30b"`, `"ui_tars_7b"`, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `GroundingModel` *** ### default() > `static` **default**(): `GroundingModel` Defined in: [index.d.ts:442](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L442) First VLM model advertised by the first VLM provider in the loaded config. Throws if no provider in the loaded config advertises a VLM service. #### Returns `GroundingModel` *** ### uiTars7B() > `static` **uiTars7B**(): `GroundingModel` Defined in: [index.d.ts:453](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L453) Convenience shim for the bundled `ui_tars_7b` alias. Throws if no provider advertises that alias. #### Returns `GroundingModel` *** ### uiVenus30B() > `static` **uiVenus30B**(): `GroundingModel` Defined in: [index.d.ts:458](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L458) Convenience shim for the bundled `ui_venus_30b` alias. Throws if no provider advertises that alias. #### Returns `GroundingModel` # Image Source: https://docs.simular.ai/simulang-js/api/latest/classes/Image # Class: Image Defined in: [index.d.ts:484](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L484) Represents an image. ## Constructors ### Constructor > **new Image**(): `Image` #### Returns `Image` ## Accessors ### dimensions #### Get Signature > **get** **dimensions**(): \[`number`, `number`] Defined in: [index.d.ts:513](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L513) Returns the image dimensions as `[width, height]` in pixels. ##### Returns \[`number`, `number`] ## Methods ### addGrid() > **addGrid**(`width`, `height`): `void` Defined in: [index.d.ts:492](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L492) Draws a cross-hair grid on the image. Grid squares have the specified `width` and `height`. #### Parameters ##### width `number` ##### height `number` #### Returns `void` *** ### base64() > **base64**(): `string` Defined in: [index.d.ts:520](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L520) Returns the image encoded as a base64 data URL. The result includes the MIME prefix, for example `data:image/png;base64,...` or `data:image/jpeg;base64,...`. #### Returns `string` *** ### compress() > **compress**(`quality`): `void` Defined in: [index.d.ts:499](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L499) Compress the image by converting it to JPEG with the specified quality. The quality is a value between 1 and 100. 1 is the lowest possible quality and 100 is the highest quality. #### Parameters ##### quality `number` #### Returns `void` *** ### ground() > **ground**(`model`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:535](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L535) Locate `concept` on this image using the given grounding model and return absolute zero-based pixel coordinates `[x, y]`. Equivalent to `model.ground(image, concept)` #### Parameters ##### model [`GroundingModel`](GroundingModel.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### save() > **save**(`path`): `void` Defined in: [index.d.ts:486](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L486) Path includes the file name and the extension. #### Parameters ##### path `string` #### Returns `void` *** ### shrink() > **shrink**(`nwidth`, `nheight`): `void` Defined in: [index.d.ts:511](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L511) Resizes this image if it is larger than the desired size. The image's aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight. This method operates on pixel channel values directly without taking into account color space data. We commonly use this to resize the image to 1920x1080. #### Parameters ##### nwidth `number` ##### nheight `number` #### Returns `void` *** ### fromBase64() > `static` **fromBase64**(`base64`): `Image` Defined in: [index.d.ts:528](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L528) Decodes a base64 image string into an image. Accepts either a raw base64 payload or a data URL such as `data:image/png;base64,...`, `data:image/jpeg;base64,...`, or `data:image/jpg;base64,...`. #### Parameters ##### base64 `string` #### Returns `Image` # Instance Source: https://docs.simular.ai/simulang-js/api/latest/classes/Instance # Class: Instance Defined in: [index.d.ts:539](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L539) Represents an opened application instance. ## Constructors ### Constructor > **new Instance**(): `Instance` #### Returns `Instance` ## Accessors ### pid #### Get Signature > **get** **pid**(): `number` Defined in: [index.d.ts:541](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L541) Get the process ID of the opened application (returns 0 when unknown). ##### Returns `number` ## Methods ### content() > **content**(): `string` Defined in: [index.d.ts:550](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L550) #### Returns `string` *** ### disableAccessibility() > **disableAccessibility**(): `void` Defined in: [index.d.ts:566](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L566) Disable the accessibility tree for the instance. Creating the accessibility tree is resource-intensive, so many applications disable it by default. After we are done controlling the instance, we should disable the accessibility tree to save resources. #### Returns `void` *** ### enableAccessibility() > **enableAccessibility**(): `void` Defined in: [index.d.ts:558](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L558) Enables the accessibility tree for the instance. This also works when the application is already running. #### Returns `void` *** ### focus() > **focus**(): `boolean` Defined in: [index.d.ts:549](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L549) Brings the instance to the foreground and gives it focus. #### Returns `boolean` *** ### hide() > **hide**(): `boolean` Defined in: [index.d.ts:543](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L543) Minimizes the instance. #### Returns `boolean` *** ### isAccessible() > **isAccessible**(): `boolean` Defined in: [index.d.ts:552](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L552) Returns true if the instance has an accessibility tree. #### Returns `boolean` *** ### isFocused() > **isFocused**(): `boolean` Defined in: [index.d.ts:547](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L547) Returns true if the instance has the focus. #### Returns `boolean` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): [`AccessibilityNode`](AccessibilityNode.mdx)\[] Defined in: [index.d.ts:591](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L591) Search this application's accessibility tree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Mirrors `simulang_rs::Instance::scored_search` with `BowJaccard` as the scorer and a permissive filter; returns every node whose score equals the maximum found and exceeds `threshold`. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node Returned nodes are full `AccessibilityNode` handles β€” call action methods (`activate`, `setValue`, …) directly on them, walk children with `.children()`, or render a snapshot with `.snapshot()`. #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns [`AccessibilityNode`](AccessibilityNode.mdx)\[] *** ### show() > **show**(): `boolean` Defined in: [index.d.ts:545](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L545) Shows the instance. #### Returns `boolean` # KeyboardController Source: https://docs.simular.ai/simulang-js/api/latest/classes/KeyboardController # Class: KeyboardController Defined in: [index.d.ts:604](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L604) Contains functions to simulate key presses/releases and to input text. For entering text, the `text` method is best. If you want to enter a key without having to worry about the layout or the keymap, use the `key` method. If you want a specific (physical) key to be pressed (e.g WASD for games), use the `raw` method. The resulting keysym will depend on the layout/keymap. ## Constructors ### Constructor > **new KeyboardController**(): `KeyboardController` Defined in: [index.d.ts:605](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L605) #### Returns `KeyboardController` ## Methods ### key() > **key**(`key`, `direction`): `void` Defined in: [index.d.ts:619](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L619) Sends an individual key event. It will enter the keysym (virtual key). Have a look at the `raw` method, if you want to enter a keycode. Some of the keys are specific to a platform. #### Parameters ##### key [`Key`](../enumerations/Key.mdx) ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### keyOther() > **keyOther**(`value`, `direction`): `void` Defined in: [index.d.ts:623](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L623) Sends a key event for a raw, platform-specific key value. #### Parameters ##### value `number` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### keyUnicode() > **keyUnicode**(`value`, `direction`): `void` Defined in: [index.d.ts:621](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L621) Sends an individual Unicode key event. Provide a single character. #### Parameters ##### value `string` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### raw() > **raw**(`keycode`, `direction`): `void` Defined in: [index.d.ts:635](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L635) Sends a raw keycode. The keycode may or may not be mapped on the current layout. You have to make sure of that yourself. This can be useful if you want to simulate a press regardless of the layout (WASD on video games). Have a look at the `key` method, if you just want to enter a specific key and don't want to worry about the layout/keymap. Windows only: If you want to enter the keycode (scancode) of an extended key, you need to set the high byte for the extended key too. You can for example do: `raw(0xE01D, Direction.Click)` to simulate `RControl`. #### Parameters ##### keycode `number` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### text() > **text**(`text`): `void` Defined in: [index.d.ts:611](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L611) Enter the text. You can use unicode here like: ❀吅. This works regardless of the current keyboard layout. You cannot use this function for entering shortcuts or something similar. For shortcuts, use the `key` method instead. #### Parameters ##### text `string` #### Returns `void` # LoopbackSource Source: https://docs.simular.ai/simulang-js/api/latest/classes/LoopbackSource # Class: LoopbackSource Defined in: [index.d.ts:647](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L647) A loopback capture source that records system audio output (what the user hears through their speakers or headphones). Loopback capture is inherently platform-specific: macOS uses `ScreenCaptureKit` (requires screen-recording permission), Windows uses WASAPI loopback mode, and Linux uses PulseAudio/PipeWire monitor sources. ## Constructors ### Constructor > **new LoopbackSource**(`channels`, `sampleRate`): `LoopbackSource` Defined in: [index.d.ts:658](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L658) Opens a loopback capture stream for the given format. `channels` is the number of interleaved channels (1 = mono, 2 = stereo). `sample_rate` is samples per second per channel (e.g. 44100, 48000). The stream does not begin producing samples until `start()` is called. #### Parameters ##### channels `number` ##### sampleRate `number` #### Returns `LoopbackSource` ## Accessors ### channels #### Get Signature > **get** **channels**(): `number` Defined in: [index.d.ts:670](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L670) Number of interleaved channels (1 = mono, 2 = stereo). ##### Returns `number` *** ### sampleRate #### Get Signature > **get** **sampleRate**(): `number` Defined in: [index.d.ts:672](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L672) Samples per second per channel (e.g. 44100, 48000). ##### Returns `number` ## Methods ### drain() > **drain**(): [`SamplesBuffer`](SamplesBuffer.mdx) Defined in: [index.d.ts:686](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L686) Drains all buffered samples and returns them as a `SamplesBuffer`. Typical usage: call `start()`, do work while audio accumulates in the background, call `stop()`, then call `drain()` to collect everything that was captured. #### Returns [`SamplesBuffer`](SamplesBuffer.mdx) *** ### record() > **record**(`durationMs`): [`SamplesBuffer`](SamplesBuffer.mdx) Defined in: [index.d.ts:678](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L678) Blocks for exactly `duration_ms` and returns the captured audio as a `SamplesBuffer`. Useful for streaming fixed-size chunks while the source is still running. #### Parameters ##### durationMs `number` #### Returns [`SamplesBuffer`](SamplesBuffer.mdx) *** ### start() > **start**(): `void` Defined in: [index.d.ts:663](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L663) Begin capturing system audio. Must be called before `record()` or `drain()`. #### Returns `void` *** ### stop() > **stop**(): `void` Defined in: [index.d.ts:668](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L668) Stop capturing. May be started again with `start()`. After stopping, call `drain()` to collect remaining buffered samples. #### Returns `void` # MouseController Source: https://docs.simular.ai/simulang-js/api/latest/classes/MouseController # Class: MouseController Defined in: [index.d.ts:697](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L697) Contains functions to control the mouse and to get the location of the cursor. A cartesian coordinate system is used for specifying coordinates. The origin is located in the top-left corner of the current screen, with positive values extending along the axes down and to the right of the origin point and it is measured in pixels. The same coordinate system is used on all operating systems. ## Constructors ### Constructor > **new MouseController**(): `MouseController` Defined in: [index.d.ts:698](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L698) #### Returns `MouseController` ## Methods ### button() > **button**(`button`, `direction`): `void` Defined in: [index.d.ts:704](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L704) Sends an individual mouse button event. You can use this for example to simulate a click of the left mouse key. Some of the buttons are specific to a platform. #### Parameters ##### button [`Button`](../enumerations/Button.mdx) ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### location() > **location**(): \[`number`, `number`] Defined in: [index.d.ts:729](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L729) Get the location of the mouse in pixels. #### Returns \[`number`, `number`] *** ### moveMouse() > **moveMouse**(`x`, `y`, `coordinate`): `void` Defined in: [index.d.ts:720](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L720) Move the mouse cursor to the specified x and y coordinates. You can specify absolute coordinates or relative from the current position. If you use absolute coordinates, the top left corner of your monitor screen is x=0 y=0. Move the cursor down the screen by increasing the y and to the right by increasing x coordinate. If you use relative coordinates, a positive x value moves the mouse cursor `x` pixels to the right. A negative value for `x` moves the mouse cursor to the left. A positive value of y moves the mouse cursor down, a negative one moves the mouse cursor up. #### Parameters ##### x `number` ##### y `number` ##### coordinate [`Coordinate`](../enumerations/Coordinate.mdx) #### Returns `void` *** ### scroll() > **scroll**(`deltaX`, `deltaY`): `void` Defined in: [index.d.ts:727](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L727) Send a mouse scroll event. A positive length will result in scrolling down/right and negative ones up/left. #### Parameters ##### deltaX `number` ##### deltaY `number` #### Returns `void` # Player Source: https://docs.simular.ai/simulang-js/api/latest/classes/Player # Class: Player Defined in: [index.d.ts:738](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L738) Handle to a device that outputs sounds. Dropping the `Player` (prevent this by holding a reference) stops all its sounds. ## Constructors ### Constructor > **new Player**(): `Player` #### Returns `Player` ## Accessors ### isPaused #### Get Signature > **get** **isPaused**(): `boolean` Defined in: [index.d.ts:791](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L791) Whether the player is currently paused. Players can be paused and resumed using `pause()` and `play()`. ##### Returns `boolean` *** ### speed #### Get Signature > **get** **speed**(): `number` Defined in: [index.d.ts:781](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L781) Playback speed of the sound. Increasing the speed will increase the pitch by the same factor. For example, speed `0.5` halves the frequency (lowering pitch) and speed `2` doubles it (raising pitch). Changes in speed affect the total duration inversely. ##### Returns `number` #### Set Signature > **set** **speed**(`value`): `void` Defined in: [index.d.ts:786](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L786) Changes the play speed of the sound. Does not adjust the samples, only the playback speed. ##### Parameters ###### value `number` ##### Returns `void` *** ### volume #### Get Signature > **get** **volume**(): `number` Defined in: [index.d.ts:765](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L765) Volume of the sound. The value `1.0` is the "normal" volume (unfiltered input). Any value other than `1.0` will multiply each sample by this value. ##### Returns `number` #### Set Signature > **set** **volume**(`value`): `void` Defined in: [index.d.ts:772](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L772) Sets the volume of the sound. The value `1.0` is the "normal" volume (unfiltered input). Any value other than `1.0` will multiply each sample by this value. ##### Parameters ###### value `number` ##### Returns `void` ## Methods ### appendFile() > **appendFile**(`path`): `void` Defined in: [index.d.ts:745](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L745) Decodes an audio file and appends it to the playback queue. Supports WAV, MP3, FLAC, Vorbis/OGG, and other formats depending on build features. #### Parameters ##### path `string` #### Returns `void` *** ### appendSamples() > **appendSamples**(`buffer`): `void` Defined in: [index.d.ts:747](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L747) Appends a sound to the queue of sounds to play. #### Parameters ##### buffer [`SamplesBuffer`](SamplesBuffer.mdx) #### Returns `void` *** ### clear() > **clear**(): `void` Defined in: [index.d.ts:813](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L813) Removes all currently loaded sources from the player and pauses it. #### Returns `void` *** ### empty() > **empty**(): `boolean` Defined in: [index.d.ts:793](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L793) Returns `true` if this player has no more sounds to play. #### Returns `boolean` *** ### getPos() > **getPos**(): `number` Defined in: [index.d.ts:808](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L808) Returns the position of the sound that's being played, in milliseconds. This takes into account any speedup or delay applied. Example: if you apply a speedup of *2* to a source and `getPos()` returns *5000* then the position in the recording is *10 seconds* from its start. #### Returns `number` *** ### len() > **len**(): `number` Defined in: [index.d.ts:795](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L795) Returns the number of sounds currently in the queue. #### Returns `number` *** ### pause() > **pause**(): `void` Defined in: [index.d.ts:756](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L756) Pauses playback of this player. No effect if already paused. A paused player can be resumed with `play()`. #### Returns `void` *** ### play() > **play**(): `void` Defined in: [index.d.ts:749](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L749) Resumes playback of a paused player. No effect if not paused. #### Returns `void` *** ### skipOne() > **skipOne**(): `void` Defined in: [index.d.ts:821](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L821) Skips to the next source in the player. If there are more sources appended to the player at the time, it will play the next one. Otherwise, the player will finish as if it had finished playing a source all the way through. #### Returns `void` *** ### sleepUntilEnd() > **sleepUntilEnd**(): `void` Defined in: [index.d.ts:797](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L797) Sleeps the current thread until the sound ends. #### Returns `void` *** ### stop() > **stop**(): `void` Defined in: [index.d.ts:758](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L758) Stops the player by emptying the queue. #### Returns `void` *** ### trySeek() > **trySeek**(`posMs`): `void` Defined in: [index.d.ts:833](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L833) Attempts to seek to the given position (in milliseconds) in the current source. This blocks between 0 and \~5 milliseconds. As long as the duration of the source is known, seek is guaranteed to saturate at the end of the source. For example given a source that reports a total duration of 42 seconds, calling `trySeek(60000)` will seek to 42 seconds. #### Parameters ##### posMs `number` #### Returns `void` # SamplesBuffer Source: https://docs.simular.ai/simulang-js/api/latest/classes/SamplesBuffer # Class: SamplesBuffer Defined in: [index.d.ts:837](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L837) A buffer of samples treated as a source. ## Constructors ### Constructor > **new SamplesBuffer**(`channels`, `sampleRate`, `samples`): `SamplesBuffer` Defined in: [index.d.ts:846](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L846) Creates a new buffer from raw PCM samples. `channels` is the number of interleaved channels (1 = mono, 2 = stereo). `sample_rate` is samples per second per channel (e.g. 16000, 44100). `samples` is an array of f32 audio samples in `[-1.0, 1.0]`. #### Parameters ##### channels `number` ##### sampleRate `number` ##### samples `number`\[] #### Returns `SamplesBuffer` ## Accessors ### channels #### Get Signature > **get** **channels**(): `number` Defined in: [index.d.ts:848](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L848) Number of interleaved channels (1 = mono, 2 = stereo). ##### Returns `number` *** ### durationMs #### Get Signature > **get** **durationMs**(): `number` Defined in: [index.d.ts:852](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L852) Total duration of the buffer in milliseconds. ##### Returns `number` *** ### sampleRate #### Get Signature > **get** **sampleRate**(): `number` Defined in: [index.d.ts:850](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L850) Samples per second per channel (e.g. 16000, 44100). ##### Returns `number` ## Methods ### transcribe() > **transcribe**(`model`): `string` Defined in: [index.d.ts:859](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L859) Transcribe this audio buffer with the given speech-to-text model and return the recognized text. Equivalent to `model.transcribe(buffer)` #### Parameters ##### model [`SttModel`](SttModel.mdx) #### Returns `string` # Screen Source: https://docs.simular.ai/simulang-js/api/latest/classes/Screen # Class: Screen Defined in: [index.d.ts:863](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L863) Represents a physical display/screen. ## Constructors ### Constructor > **new Screen**(): `Screen` #### Returns `Screen` ## Methods ### dimensions() > **dimensions**(): \[`number`, `number`, `number`, `number`] Defined in: [index.d.ts:877](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L877) Returns the dimensions of the screen in pixels. The return value is `[x, y, width, height]`. #### Returns \[`number`, `number`, `number`, `number`] *** ### fromCurrentMouseLocation() > `static` **fromCurrentMouseLocation**(): `Screen` Defined in: [index.d.ts:871](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L871) Returns the screen identifier for the screen on which the mouse is located. If the mouse is not on any screen, the main screen is returned. #### Returns `Screen` *** ### mainScreen() > `static` **mainScreen**(): `Screen` Defined in: [index.d.ts:865](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L865) Returns the screen identifier for the main screen. #### Returns `Screen` # Screenshot Source: https://docs.simular.ai/simulang-js/api/latest/classes/Screenshot # Class: Screenshot Defined in: [index.d.ts:881](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L881) Represents a screenshot capture. ## Constructors ### Constructor > **new Screenshot**(): `Screenshot` #### Returns `Screenshot` ## Accessors ### dimensions #### Get Signature > **get** **dimensions**(): \[`number`, `number`] Defined in: [index.d.ts:910](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L910) Returns the screenshot dimensions as `[width, height]` in pixels. ##### Returns \[`number`, `number`] ## Methods ### addGrid() > **addGrid**(`width`, `height`): `void` Defined in: [index.d.ts:889](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L889) Draws a cross-hair grid on the image. Grid squares have the specified `width` and `height`. #### Parameters ##### width `number` ##### height `number` #### Returns `void` *** ### base64() > **base64**(): `string` Defined in: [index.d.ts:917](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L917) Returns the image encoded as a base64 data URL. The result includes the MIME prefix, for example `data:image/png;base64,...` or `data:image/jpeg;base64,...`. #### Returns `string` *** ### compress() > **compress**(`quality`): `void` Defined in: [index.d.ts:896](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L896) Compress the image by converting it to JPEG with the specified quality. The quality is a value between 1 and 100. 1 is the lowest possible quality and 100 is the highest quality. #### Parameters ##### quality `number` #### Returns `void` *** ### ground() > **ground**(`model`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:939](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L939) Locate `concept` on this screenshot using the given grounding model and return the corresponding **global physical pixel coordinates** `[x, y]`. The output can be fed directly to primitives that expect global screen coordinates. Equivalent to `model.ground(screenshot, concept)`. #### Parameters ##### model [`GroundingModel`](GroundingModel.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### save() > **save**(`path`): `void` Defined in: [index.d.ts:883](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L883) Path includes the file name and the extension. #### Parameters ##### path `string` #### Returns `void` *** ### shrink() > **shrink**(`nwidth`, `nheight`): `void` Defined in: [index.d.ts:908](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L908) Resizes this image if it is larger than the desired size. The image's aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight. This method operates on pixel channel values directly without taking into account color space data. We commonly use this to resize the image to 1920x1080. #### Parameters ##### nwidth `number` ##### nheight `number` #### Returns `void` *** ### toGlobalPhysicalPixels() > **toGlobalPhysicalPixels**(`x`, `y`, `coordType`): \[`number`, `number`] Defined in: [index.d.ts:930](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L930) Converts a point in this screenshot to global physical pixel coordinates. Screenshots may represent only part of a display, and displays may use different scale factors. Use this to map `(x, y)` to the corresponding global physical pixel position (for example, when moving the mouse to the same on-screen point). See `ScreenshotCoordinateType` for how `coord_type` affects interpretation of `(x, y)`. #### Parameters ##### x `number` ##### y `number` ##### coordType [`ScreenshotCoordinateType`](ScreenshotCoordinateType.mdx) #### Returns \[`number`, `number`] # ScreenshotCoordinateType Source: https://docs.simular.ai/simulang-js/api/latest/classes/ScreenshotCoordinateType # Class: ScreenshotCoordinateType Defined in: [index.d.ts:946](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L946) Describes how `(x, y)` coordinates passed to `Screenshot.toGlobalPhysicalPixels` should be interpreted. ## Constructors ### Constructor > **new ScreenshotCoordinateType**(): `ScreenshotCoordinateType` #### Returns `ScreenshotCoordinateType` ## Methods ### absolute() > `static` **absolute**(): `ScreenshotCoordinateType` Defined in: [index.d.ts:951](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L951) Coordinates are in screenshot image pixels (valid range: `0..=image_width-1`). #### Returns `ScreenshotCoordinateType` *** ### normalized() > `static` **normalized**(`range`): `ScreenshotCoordinateType` Defined in: [index.d.ts:958](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L958) Coordinates are normalized to a fixed range. Many VLMs (Qwen-VL, UI-TARS, etc.) output grounding coordinates in `[0, range]` rather than in pixel space. `range` specifies the inclusive upper bound (e.g. 1000, meaning valid coordinates are `0..=1000`). #### Parameters ##### range `number` #### Returns `ScreenshotCoordinateType` # SttModel Source: https://docs.simular.ai/simulang-js/api/latest/classes/SttModel # Class: SttModel Defined in: [index.d.ts:962](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L962) A speech-to-text model that can transcribe audio. ## Constructors ### Constructor > **new SttModel**(): `SttModel` #### Returns `SttModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:992](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L992) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### transcribe() > **transcribe**(`audio`): `string` Defined in: [index.d.ts:994](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L994) Transcribe a single audio chunk and return the recognised text. #### Parameters ##### audio [`SamplesBuffer`](SamplesBuffer.mdx) #### Returns `string` *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:990](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L990) Every STT model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files) advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `SttModel` Defined in: [index.d.ts:974](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L974) Resolve a model alias against the loaded config (e.g. `"whisper_large_v3_turbo"`, `"whisper_large_v3"`, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `SttModel` *** ### default() > `static` **default**(): `SttModel` Defined in: [index.d.ts:968](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L968) First STT model advertised by the first STT provider in the loaded config. Throws if no provider in the loaded config advertises an STT service. #### Returns `SttModel` *** ### whisperLargeV3() > `static` **whisperLargeV3**(): `SttModel` Defined in: [index.d.ts:984](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L984) Whisper Large V3 β€” highest accuracy. Convenience shim for the bundled `whisper_large_v3` alias. #### Returns `SttModel` *** ### whisperLargeV3Turbo() > `static` **whisperLargeV3Turbo**(): `SttModel` Defined in: [index.d.ts:979](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L979) Whisper Large V3 Turbo β€” fast, slightly less accurate. Convenience shim for the bundled `whisper_large_v3_turbo` alias. #### Returns `SttModel` # System Source: https://docs.simular.ai/simulang-js/api/latest/classes/System # Class: System Defined in: [index.d.ts:998](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L998) Provides system-wide operations. ## Constructors ### Constructor > **new System**(): `System` #### Returns `System` ## Methods ### fuzzySearch() > `static` **fuzzySearch**(`query`): [`App`](App.mdx) Defined in: [index.d.ts:1005](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1005) Tries to find an installed app by fuzzy matching against the available app list. #### Parameters ##### query `string` #### Returns [`App`](App.mdx) *** ### listApps() > `static` **listApps**(): [`App`](App.mdx)\[] Defined in: [index.d.ts:1000](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1000) Returns all available applications. #### Returns [`App`](App.mdx)\[] # Window Source: https://docs.simular.ai/simulang-js/api/latest/classes/Window # Class: Window Defined in: [index.d.ts:1013](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1013) Handle to an on-screen window. Constructed via \[`Window.all`] or \[`Window.allForPid`] and exposes read-only metadata (`title`, `pid`) alongside basic actions (`minimize`, `maximize`, `close`). ## Constructors ### Constructor > **new Window**(): `Window` #### Returns `Window` ## Accessors ### pid #### Get Signature > **get** **pid**(): `number` Defined in: [index.d.ts:1021](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1021) Process ID that owns this window. ##### Returns `number` *** ### title #### Get Signature > **get** **title**(): `string` Defined in: [index.d.ts:1019](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1019) Window title (may be empty). ##### Returns `string` ## Methods ### close() > **close**(): `void` Defined in: [index.d.ts:1030](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1030) Close the window (user-equivalent to clicking the close button / pressing Alt+F4 / Cmd+W). #### Returns `void` *** ### maximize() > **maximize**(): `void` Defined in: [index.d.ts:1025](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1025) Maximize / zoom the window. #### Returns `void` *** ### minimize() > **minimize**(): `void` Defined in: [index.d.ts:1023](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1023) Minimize the window (hide to taskbar / Dock). #### Returns `void` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): [`AccessibilityNode`](AccessibilityNode.mdx)\[] Defined in: [index.d.ts:1068](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1068) Search this window's accessibility subtree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Mirrors `simulang_rs::Window::scored_search` (macOS / Linux) β€” on Windows we use the same underlying primitive via `WindowTrait::node().scored_search(...)`, which prebuilds the cached UIA subtree so the walk costs a single IPC. Returns every node whose score equals the maximum found and exceeds `threshold`. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node Returned nodes are full `AccessibilityNode` handles β€” call action methods (`activate`, `setValue`, …) directly on them, walk children with `.children()`, or render a snapshot with `.snapshot()`. #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns [`AccessibilityNode`](AccessibilityNode.mdx)\[] *** ### snapshot() > **snapshot**(): `string` Defined in: [index.d.ts:1041](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1041) Render the window's accessibility subtree as an indented Playwright-style aria snapshot. One line per node, two spaces of indentation per depth level, in pre-order DFS. Roles are emitted raw (`AXWindow` on macOS, `UIA.ControlType.*` on Windows), with title and value appended when non-empty. No refs are assigned β€” for ref-based interaction use \[`AccessibilityTree.snapshot`] instead. #### Returns `string` *** ### all() > `static` **all**(): `Window`\[] Defined in: [index.d.ts:1017](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1017) All visible top-level windows across every process. #### Returns `Window`\[] *** ### allForPid() > `static` **allForPid**(`pid`): `Window`\[] Defined in: [index.d.ts:1015](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1015) All visible top-level windows for a given process. #### Parameters ##### pid `number` #### Returns `Window`\[] # AriaRole Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/AriaRole # Enumeration: AriaRole Defined in: [index.d.ts:1093](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1093) Cross-platform ARIA / Playwright role. Used as the `role` field on accessibility snapshots and as the search key in \[`AccessibilityTree::find`]. ## Enumeration Members ### Alert > **Alert**: `0` Defined in: [index.d.ts:1094](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1094) *** ### AlertDialog > **AlertDialog**: `1` Defined in: [index.d.ts:1095](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1095) *** ### Application > **Application**: `2` Defined in: [index.d.ts:1096](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1096) *** ### Article > **Article**: `3` Defined in: [index.d.ts:1097](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1097) *** ### Audio > **Audio**: `4` Defined in: [index.d.ts:1098](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1098) *** ### Banner > **Banner**: `5` Defined in: [index.d.ts:1099](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1099) *** ### Blockquote > **Blockquote**: `6` Defined in: [index.d.ts:1100](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1100) *** ### Button > **Button**: `7` Defined in: [index.d.ts:1101](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1101) *** ### Caption > **Caption**: `8` Defined in: [index.d.ts:1102](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1102) *** ### Cell > **Cell**: `9` Defined in: [index.d.ts:1103](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1103) *** ### Checkbox > **Checkbox**: `10` Defined in: [index.d.ts:1104](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1104) *** ### Code > **Code**: `11` Defined in: [index.d.ts:1105](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1105) *** ### ColumnHeader > **ColumnHeader**: `12` Defined in: [index.d.ts:1106](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1106) *** ### Combobox > **Combobox**: `13` Defined in: [index.d.ts:1107](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1107) *** ### Complementary > **Complementary**: `14` Defined in: [index.d.ts:1108](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1108) *** ### ContentInfo > **ContentInfo**: `15` Defined in: [index.d.ts:1109](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1109) *** ### Definition > **Definition**: `16` Defined in: [index.d.ts:1110](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1110) *** ### Deletion > **Deletion**: `17` Defined in: [index.d.ts:1111](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1111) *** ### Dialog > **Dialog**: `18` Defined in: [index.d.ts:1112](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1112) *** ### Directory > **Directory**: `19` Defined in: [index.d.ts:1113](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1113) *** ### Document > **Document**: `20` Defined in: [index.d.ts:1114](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1114) *** ### Emphasis > **Emphasis**: `21` Defined in: [index.d.ts:1115](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1115) *** ### Feed > **Feed**: `22` Defined in: [index.d.ts:1116](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1116) *** ### Figure > **Figure**: `23` Defined in: [index.d.ts:1117](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1117) *** ### Form > **Form**: `24` Defined in: [index.d.ts:1118](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1118) *** ### Generic > **Generic**: `25` Defined in: [index.d.ts:1119](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1119) *** ### Grid > **Grid**: `26` Defined in: [index.d.ts:1120](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1120) *** ### GridCell > **GridCell**: `27` Defined in: [index.d.ts:1121](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1121) *** ### Group > **Group**: `28` Defined in: [index.d.ts:1122](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1122) *** ### Heading > **Heading**: `29` Defined in: [index.d.ts:1123](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1123) *** ### Img > **Img**: `30` Defined in: [index.d.ts:1124](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1124) *** ### Insertion > **Insertion**: `31` Defined in: [index.d.ts:1125](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1125) *** ### Link > **Link**: `32` Defined in: [index.d.ts:1126](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1126) *** ### List > **List**: `33` Defined in: [index.d.ts:1127](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1127) *** ### Listbox > **Listbox**: `35` Defined in: [index.d.ts:1129](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1129) *** ### ListItem > **ListItem**: `34` Defined in: [index.d.ts:1128](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1128) *** ### Log > **Log**: `36` Defined in: [index.d.ts:1130](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1130) *** ### Main > **Main**: `37` Defined in: [index.d.ts:1131](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1131) *** ### Mark > **Mark**: `38` Defined in: [index.d.ts:1132](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1132) *** ### Marquee > **Marquee**: `39` Defined in: [index.d.ts:1133](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1133) *** ### Math > **Math**: `40` Defined in: [index.d.ts:1134](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1134) *** ### Menu > **Menu**: `41` Defined in: [index.d.ts:1135](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1135) *** ### MenuBar > **MenuBar**: `42` Defined in: [index.d.ts:1136](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1136) *** ### MenuItem > **MenuItem**: `43` Defined in: [index.d.ts:1137](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1137) *** ### MenuItemCheckbox > **MenuItemCheckbox**: `44` Defined in: [index.d.ts:1138](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1138) *** ### MenuItemRadio > **MenuItemRadio**: `45` Defined in: [index.d.ts:1139](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1139) *** ### Meter > **Meter**: `46` Defined in: [index.d.ts:1140](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1140) *** ### Navigation > **Navigation**: `47` Defined in: [index.d.ts:1141](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1141) *** ### Note > **Note**: `48` Defined in: [index.d.ts:1142](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1142) *** ### Option > **Option**: `49` Defined in: [index.d.ts:1143](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1143) *** ### Paragraph > **Paragraph**: `50` Defined in: [index.d.ts:1144](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1144) *** ### Password > **Password**: `51` Defined in: [index.d.ts:1145](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1145) *** ### Presentation > **Presentation**: `52` Defined in: [index.d.ts:1146](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1146) *** ### ProgressBar > **ProgressBar**: `53` Defined in: [index.d.ts:1147](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1147) *** ### Radio > **Radio**: `54` Defined in: [index.d.ts:1148](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1148) *** ### RadioGroup > **RadioGroup**: `55` Defined in: [index.d.ts:1149](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1149) *** ### Region > **Region**: `56` Defined in: [index.d.ts:1150](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1150) *** ### Row > **Row**: `57` Defined in: [index.d.ts:1151](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1151) *** ### RowGroup > **RowGroup**: `58` Defined in: [index.d.ts:1152](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1152) *** ### RowHeader > **RowHeader**: `59` Defined in: [index.d.ts:1153](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1153) *** ### Scrollbar > **Scrollbar**: `60` Defined in: [index.d.ts:1154](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1154) *** ### Search > **Search**: `61` Defined in: [index.d.ts:1155](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1155) *** ### Searchbox > **Searchbox**: `62` Defined in: [index.d.ts:1156](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1156) *** ### Separator > **Separator**: `63` Defined in: [index.d.ts:1157](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1157) *** ### Slider > **Slider**: `64` Defined in: [index.d.ts:1158](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1158) *** ### SpinButton > **SpinButton**: `65` Defined in: [index.d.ts:1159](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1159) *** ### Status > **Status**: `66` Defined in: [index.d.ts:1160](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1160) *** ### Strong > **Strong**: `67` Defined in: [index.d.ts:1161](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1161) *** ### Subscript > **Subscript**: `68` Defined in: [index.d.ts:1162](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1162) *** ### Suggestion > **Suggestion**: `69` Defined in: [index.d.ts:1163](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1163) *** ### Superscript > **Superscript**: `70` Defined in: [index.d.ts:1164](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1164) *** ### Switch > **Switch**: `71` Defined in: [index.d.ts:1165](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1165) *** ### Tab > **Tab**: `72` Defined in: [index.d.ts:1166](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1166) *** ### Table > **Table**: `73` Defined in: [index.d.ts:1167](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1167) *** ### TabList > **TabList**: `74` Defined in: [index.d.ts:1168](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1168) *** ### TabPanel > **TabPanel**: `75` Defined in: [index.d.ts:1169](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1169) *** ### Term > **Term**: `76` Defined in: [index.d.ts:1170](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1170) *** ### Text > **Text**: `77` Defined in: [index.d.ts:1171](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1171) *** ### Textbox > **Textbox**: `78` Defined in: [index.d.ts:1172](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1172) *** ### Time > **Time**: `79` Defined in: [index.d.ts:1173](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1173) *** ### Timer > **Timer**: `80` Defined in: [index.d.ts:1174](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1174) *** ### Toolbar > **Toolbar**: `81` Defined in: [index.d.ts:1175](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1175) *** ### Tooltip > **Tooltip**: `82` Defined in: [index.d.ts:1176](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1176) *** ### Tree > **Tree**: `83` Defined in: [index.d.ts:1177](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1177) *** ### Treegrid > **Treegrid**: `85` Defined in: [index.d.ts:1179](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1179) *** ### TreeItem > **TreeItem**: `84` Defined in: [index.d.ts:1178](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1178) *** ### Video > **Video**: `86` Defined in: [index.d.ts:1180](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1180) *** ### Window > **Window**: `87` Defined in: [index.d.ts:1181](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1181) # Button Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/Button # Enumeration: Button Defined in: [index.d.ts:1206](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1206) Represents a mouse button. ## Enumeration Members ### Back > **Back**: `3` Defined in: [index.d.ts:1210](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1210) *** ### Forward > **Forward**: `4` Defined in: [index.d.ts:1211](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1211) *** ### Left > **Left**: `0` Defined in: [index.d.ts:1207](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1207) *** ### Middle > **Middle**: `1` Defined in: [index.d.ts:1208](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1208) *** ### Right > **Right**: `2` Defined in: [index.d.ts:1209](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1209) *** ### ScrollDown > **ScrollDown**: `6` Defined in: [index.d.ts:1213](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1213) *** ### ScrollLeft > **ScrollLeft**: `7` Defined in: [index.d.ts:1214](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1214) *** ### ScrollRight > **ScrollRight**: `8` Defined in: [index.d.ts:1215](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1215) *** ### ScrollUp > **ScrollUp**: `5` Defined in: [index.d.ts:1212](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1212) # Coordinate Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/Coordinate # Enumeration: Coordinate Defined in: [index.d.ts:1219](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1219) Specifies if coordinates are relative or absolute. ## Enumeration Members ### Abs > **Abs**: `0` Defined in: [index.d.ts:1220](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1220) *** ### Rel > **Rel**: `1` Defined in: [index.d.ts:1221](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1221) # Direction Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/Direction # Enumeration: Direction Defined in: [index.d.ts:1225](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1225) The direction of a button event. ## Enumeration Members ### Click > **Click**: `2` Defined in: [index.d.ts:1228](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1228) *** ### Press > **Press**: `0` Defined in: [index.d.ts:1226](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1226) *** ### Release > **Release**: `1` Defined in: [index.d.ts:1227](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1227) # FocusPolicy Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/FocusPolicy # Enumeration: FocusPolicy Defined in: [index.d.ts:1235](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1235) Focus behavior when opening an application. ## Enumeration Members ### DoNotSteal > **DoNotSteal**: `0` Defined in: [index.d.ts:1240](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1240) Request launch without forcing activation/frontmost focus; some applications may still steal focus. *** ### Steal > **Steal**: `1` Defined in: [index.d.ts:1242](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1242) Allow the launched app to become active/frontmost. # Key Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/Key # Enumeration: Key Defined in: [index.d.ts:1309](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1309) Represents a keyboard key. ## Enumeration Members ### A > **A**: `10` Defined in: [index.d.ts:1320](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1320) *** ### AbntC1 > **AbntC1**: `36` Defined in: [index.d.ts:1346](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1346) *** ### AbntC2 > **AbntC2**: `37` Defined in: [index.d.ts:1347](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1347) *** ### Accept > **Accept**: `38` Defined in: [index.d.ts:1348](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1348) *** ### Add > **Add**: `39` Defined in: [index.d.ts:1349](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1349) *** ### Alt > **Alt**: `40` Defined in: [index.d.ts:1351](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1351) alt key on Linux and Windows (option key on macOS) *** ### Apps > **Apps**: `41` Defined in: [index.d.ts:1352](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1352) *** ### Attn > **Attn**: `42` Defined in: [index.d.ts:1353](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1353) *** ### B > **B**: `11` Defined in: [index.d.ts:1321](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1321) *** ### Backspace > **Backspace**: `43` Defined in: [index.d.ts:1355](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1355) backspace key *** ### Begin > **Begin**: `45` Defined in: [index.d.ts:1357](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1357) *** ### Break > **Break**: `44` Defined in: [index.d.ts:1356](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1356) *** ### BrightnessDown > **BrightnessDown**: `46` Defined in: [index.d.ts:1358](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1358) *** ### BrightnessUp > **BrightnessUp**: `47` Defined in: [index.d.ts:1359](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1359) *** ### BrowserBack > **BrowserBack**: `48` Defined in: [index.d.ts:1360](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1360) *** ### BrowserFavorites > **BrowserFavorites**: `49` Defined in: [index.d.ts:1361](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1361) *** ### BrowserForward > **BrowserForward**: `50` Defined in: [index.d.ts:1362](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1362) *** ### BrowserHome > **BrowserHome**: `51` Defined in: [index.d.ts:1363](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1363) *** ### BrowserRefresh > **BrowserRefresh**: `52` Defined in: [index.d.ts:1364](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1364) *** ### BrowserSearch > **BrowserSearch**: `53` Defined in: [index.d.ts:1365](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1365) *** ### BrowserStop > **BrowserStop**: `54` Defined in: [index.d.ts:1366](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1366) *** ### C > **C**: `12` Defined in: [index.d.ts:1322](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1322) *** ### Cancel > **Cancel**: `55` Defined in: [index.d.ts:1367](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1367) *** ### CapsLock > **CapsLock**: `56` Defined in: [index.d.ts:1369](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1369) caps lock key *** ### Clear > **Clear**: `57` Defined in: [index.d.ts:1370](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1370) *** ### ContrastDown > **ContrastDown**: `59` Defined in: [index.d.ts:1372](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1372) *** ### ContrastUp > **ContrastUp**: `58` Defined in: [index.d.ts:1371](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1371) *** ### Control > **Control**: `60` Defined in: [index.d.ts:1374](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1374) control key *** ### Convert > **Convert**: `61` Defined in: [index.d.ts:1375](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1375) *** ### Crsel > **Crsel**: `62` Defined in: [index.d.ts:1376](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1376) *** ### D > **D**: `13` Defined in: [index.d.ts:1323](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1323) *** ### DBEAlphanumeric > **DBEAlphanumeric**: `63` Defined in: [index.d.ts:1377](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1377) *** ### DBECodeinput > **DBECodeinput**: `64` Defined in: [index.d.ts:1378](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1378) *** ### DBEDetermineString > **DBEDetermineString**: `65` Defined in: [index.d.ts:1379](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1379) *** ### DBEEnterDLGConversionMode > **DBEEnterDLGConversionMode**: `66` Defined in: [index.d.ts:1380](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1380) *** ### DBEEnterIMEConfigMode > **DBEEnterIMEConfigMode**: `67` Defined in: [index.d.ts:1381](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1381) *** ### DBEEnterWordRegisterMode > **DBEEnterWordRegisterMode**: `68` Defined in: [index.d.ts:1382](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1382) *** ### DBEFlushString > **DBEFlushString**: `69` Defined in: [index.d.ts:1383](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1383) *** ### DBEHiragana > **DBEHiragana**: `70` Defined in: [index.d.ts:1384](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1384) *** ### DBEKatakana > **DBEKatakana**: `71` Defined in: [index.d.ts:1385](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1385) *** ### DBENoCodepoint > **DBENoCodepoint**: `72` Defined in: [index.d.ts:1386](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1386) *** ### DBENoRoman > **DBENoRoman**: `73` Defined in: [index.d.ts:1387](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1387) *** ### DBERoman > **DBERoman**: `74` Defined in: [index.d.ts:1388](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1388) *** ### DBESBCSChar > **DBESBCSChar**: `75` Defined in: [index.d.ts:1389](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1389) *** ### DBESChar > **DBESChar**: `76` Defined in: [index.d.ts:1390](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1390) *** ### Decimal > **Decimal**: `77` Defined in: [index.d.ts:1391](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1391) *** ### Delete > **Delete**: `78` Defined in: [index.d.ts:1393](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1393) delete key *** ### Divide > **Divide**: `79` Defined in: [index.d.ts:1394](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1394) *** ### DownArrow > **DownArrow**: `80` Defined in: [index.d.ts:1396](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1396) down arrow key *** ### E > **E**: `14` Defined in: [index.d.ts:1324](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1324) *** ### Eject > **Eject**: `81` Defined in: [index.d.ts:1397](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1397) *** ### End > **End**: `82` Defined in: [index.d.ts:1399](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1399) end key *** ### Ereof > **Ereof**: `83` Defined in: [index.d.ts:1400](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1400) *** ### Escape > **Escape**: `84` Defined in: [index.d.ts:1402](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1402) escape key (esc) *** ### Execute > **Execute**: `85` Defined in: [index.d.ts:1403](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1403) *** ### Exsel > **Exsel**: `86` Defined in: [index.d.ts:1404](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1404) *** ### F > **F**: `15` Defined in: [index.d.ts:1325](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1325) *** ### F1 > **F1**: `87` Defined in: [index.d.ts:1406](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1406) F1 key *** ### F10 > **F10**: `96` Defined in: [index.d.ts:1424](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1424) F10 key *** ### F11 > **F11**: `97` Defined in: [index.d.ts:1426](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1426) F11 key *** ### F12 > **F12**: `98` Defined in: [index.d.ts:1428](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1428) F12 key *** ### F13 > **F13**: `99` Defined in: [index.d.ts:1430](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1430) F13 key *** ### F14 > **F14**: `100` Defined in: [index.d.ts:1432](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1432) F14 key *** ### F15 > **F15**: `101` Defined in: [index.d.ts:1434](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1434) F15 key *** ### F16 > **F16**: `102` Defined in: [index.d.ts:1436](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1436) F16 key *** ### F17 > **F17**: `103` Defined in: [index.d.ts:1438](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1438) F17 key *** ### F18 > **F18**: `104` Defined in: [index.d.ts:1440](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1440) F18 key *** ### F19 > **F19**: `105` Defined in: [index.d.ts:1442](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1442) F19 key *** ### F2 > **F2**: `88` Defined in: [index.d.ts:1408](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1408) F2 key *** ### F20 > **F20**: `106` Defined in: [index.d.ts:1444](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1444) F20 key *** ### F21 > **F21**: `107` Defined in: [index.d.ts:1446](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1446) F21 key *** ### F22 > **F22**: `108` Defined in: [index.d.ts:1448](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1448) F22 key *** ### F23 > **F23**: `109` Defined in: [index.d.ts:1450](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1450) F23 key *** ### F24 > **F24**: `110` Defined in: [index.d.ts:1452](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1452) F24 key *** ### F25 > **F25**: `111` Defined in: [index.d.ts:1453](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1453) *** ### F26 > **F26**: `112` Defined in: [index.d.ts:1454](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1454) *** ### F27 > **F27**: `113` Defined in: [index.d.ts:1455](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1455) *** ### F28 > **F28**: `114` Defined in: [index.d.ts:1456](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1456) *** ### F29 > **F29**: `115` Defined in: [index.d.ts:1457](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1457) *** ### F3 > **F3**: `89` Defined in: [index.d.ts:1410](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1410) F3 key *** ### F30 > **F30**: `116` Defined in: [index.d.ts:1458](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1458) *** ### F31 > **F31**: `117` Defined in: [index.d.ts:1459](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1459) *** ### F32 > **F32**: `118` Defined in: [index.d.ts:1460](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1460) *** ### F33 > **F33**: `119` Defined in: [index.d.ts:1461](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1461) *** ### F34 > **F34**: `120` Defined in: [index.d.ts:1462](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1462) *** ### F35 > **F35**: `121` Defined in: [index.d.ts:1463](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1463) *** ### F4 > **F4**: `90` Defined in: [index.d.ts:1412](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1412) F4 key *** ### F5 > **F5**: `91` Defined in: [index.d.ts:1414](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1414) F5 key *** ### F6 > **F6**: `92` Defined in: [index.d.ts:1416](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1416) F6 key *** ### F7 > **F7**: `93` Defined in: [index.d.ts:1418](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1418) F7 key *** ### F8 > **F8**: `94` Defined in: [index.d.ts:1420](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1420) F8 key *** ### F9 > **F9**: `95` Defined in: [index.d.ts:1422](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1422) F9 key *** ### Final > **Final**: `123` Defined in: [index.d.ts:1465](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1465) *** ### Find > **Find**: `124` Defined in: [index.d.ts:1466](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1466) *** ### Function > **Function**: `122` Defined in: [index.d.ts:1464](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1464) *** ### G > **G**: `16` Defined in: [index.d.ts:1326](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1326) *** ### GamepadA > **GamepadA**: `125` Defined in: [index.d.ts:1467](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1467) *** ### GamepadB > **GamepadB**: `126` Defined in: [index.d.ts:1468](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1468) *** ### GamepadDPadDown > **GamepadDPadDown**: `127` Defined in: [index.d.ts:1469](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1469) *** ### GamepadDPadLeft > **GamepadDPadLeft**: `128` Defined in: [index.d.ts:1470](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1470) *** ### GamepadDPadRight > **GamepadDPadRight**: `129` Defined in: [index.d.ts:1471](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1471) *** ### GamepadDPadUp > **GamepadDPadUp**: `130` Defined in: [index.d.ts:1472](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1472) *** ### GamepadLeftShoulder > **GamepadLeftShoulder**: `131` Defined in: [index.d.ts:1473](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1473) *** ### GamepadLeftThumbstickButton > **GamepadLeftThumbstickButton**: `132` Defined in: [index.d.ts:1474](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1474) *** ### GamepadLeftThumbstickDown > **GamepadLeftThumbstickDown**: `133` Defined in: [index.d.ts:1475](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1475) *** ### GamepadLeftThumbstickLeft > **GamepadLeftThumbstickLeft**: `134` Defined in: [index.d.ts:1476](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1476) *** ### GamepadLeftThumbstickRight > **GamepadLeftThumbstickRight**: `135` Defined in: [index.d.ts:1477](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1477) *** ### GamepadLeftThumbstickUp > **GamepadLeftThumbstickUp**: `136` Defined in: [index.d.ts:1478](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1478) *** ### GamepadLeftTrigger > **GamepadLeftTrigger**: `137` Defined in: [index.d.ts:1479](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1479) *** ### GamepadMenu > **GamepadMenu**: `138` Defined in: [index.d.ts:1480](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1480) *** ### GamepadRightShoulder > **GamepadRightShoulder**: `139` Defined in: [index.d.ts:1481](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1481) *** ### GamepadRightThumbstickButton > **GamepadRightThumbstickButton**: `140` Defined in: [index.d.ts:1482](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1482) *** ### GamepadRightThumbstickDown > **GamepadRightThumbstickDown**: `141` Defined in: [index.d.ts:1483](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1483) *** ### GamepadRightThumbstickLeft > **GamepadRightThumbstickLeft**: `142` Defined in: [index.d.ts:1484](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1484) *** ### GamepadRightThumbstickRight > **GamepadRightThumbstickRight**: `143` Defined in: [index.d.ts:1485](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1485) *** ### GamepadRightThumbstickUp > **GamepadRightThumbstickUp**: `144` Defined in: [index.d.ts:1486](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1486) *** ### GamepadRightTrigger > **GamepadRightTrigger**: `145` Defined in: [index.d.ts:1487](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1487) *** ### GamepadView > **GamepadView**: `146` Defined in: [index.d.ts:1488](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1488) *** ### GamepadX > **GamepadX**: `147` Defined in: [index.d.ts:1489](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1489) *** ### GamepadY > **GamepadY**: `148` Defined in: [index.d.ts:1490](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1490) *** ### H > **H**: `17` Defined in: [index.d.ts:1327](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1327) *** ### Hangeul > **Hangeul**: `149` Defined in: [index.d.ts:1491](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1491) *** ### Hangul > **Hangul**: `150` Defined in: [index.d.ts:1492](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1492) *** ### Hanja > **Hanja**: `151` Defined in: [index.d.ts:1493](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1493) *** ### Help > **Help**: `152` Defined in: [index.d.ts:1494](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1494) *** ### Home > **Home**: `153` Defined in: [index.d.ts:1496](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1496) home key *** ### I > **I**: `18` Defined in: [index.d.ts:1328](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1328) *** ### Ico00 > **Ico00**: `154` Defined in: [index.d.ts:1497](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1497) *** ### IcoClear > **IcoClear**: `155` Defined in: [index.d.ts:1498](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1498) *** ### IcoHelp > **IcoHelp**: `156` Defined in: [index.d.ts:1499](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1499) *** ### IlluminationDown > **IlluminationDown**: `157` Defined in: [index.d.ts:1500](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1500) *** ### IlluminationToggle > **IlluminationToggle**: `159` Defined in: [index.d.ts:1502](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1502) *** ### IlluminationUp > **IlluminationUp**: `158` Defined in: [index.d.ts:1501](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1501) *** ### IMEOff > **IMEOff**: `160` Defined in: [index.d.ts:1503](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1503) *** ### IMEOn > **IMEOn**: `161` Defined in: [index.d.ts:1504](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1504) *** ### Insert > **Insert**: `162` Defined in: [index.d.ts:1505](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1505) *** ### J > **J**: `19` Defined in: [index.d.ts:1329](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1329) *** ### Junja > **Junja**: `163` Defined in: [index.d.ts:1506](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1506) *** ### K > **K**: `20` Defined in: [index.d.ts:1330](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1330) *** ### Kana > **Kana**: `164` Defined in: [index.d.ts:1507](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1507) *** ### Kanji > **Kanji**: `165` Defined in: [index.d.ts:1508](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1508) *** ### L > **L**: `21` Defined in: [index.d.ts:1331](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1331) *** ### LaunchApp1 > **LaunchApp1**: `166` Defined in: [index.d.ts:1509](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1509) *** ### LaunchApp2 > **LaunchApp2**: `167` Defined in: [index.d.ts:1510](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1510) *** ### LaunchMail > **LaunchMail**: `168` Defined in: [index.d.ts:1511](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1511) *** ### LaunchMediaSelect > **LaunchMediaSelect**: `169` Defined in: [index.d.ts:1512](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1512) *** ### Launchpad > **Launchpad**: `170` Defined in: [index.d.ts:1514](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1514) Opens launchpad *** ### LaunchPanel > **LaunchPanel**: `171` Defined in: [index.d.ts:1515](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1515) *** ### LButton > **LButton**: `172` Defined in: [index.d.ts:1516](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1516) *** ### LControl > **LControl**: `173` Defined in: [index.d.ts:1517](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1517) *** ### LeftArrow > **LeftArrow**: `174` Defined in: [index.d.ts:1519](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1519) left arrow key *** ### Linefeed > **Linefeed**: `175` Defined in: [index.d.ts:1520](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1520) *** ### LMenu > **LMenu**: `176` Defined in: [index.d.ts:1521](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1521) *** ### LShift > **LShift**: `177` Defined in: [index.d.ts:1522](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1522) *** ### LWin > **LWin**: `178` Defined in: [index.d.ts:1523](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1523) *** ### M > **M**: `22` Defined in: [index.d.ts:1332](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1332) *** ### MButton > **MButton**: `179` Defined in: [index.d.ts:1524](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1524) *** ### MediaFast > **MediaFast**: `180` Defined in: [index.d.ts:1525](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1525) *** ### MediaNextTrack > **MediaNextTrack**: `181` Defined in: [index.d.ts:1526](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1526) *** ### MediaPlayPause > **MediaPlayPause**: `182` Defined in: [index.d.ts:1527](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1527) *** ### MediaPrevTrack > **MediaPrevTrack**: `183` Defined in: [index.d.ts:1528](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1528) *** ### MediaRewind > **MediaRewind**: `184` Defined in: [index.d.ts:1529](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1529) *** ### MediaStop > **MediaStop**: `185` Defined in: [index.d.ts:1530](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1530) *** ### Meta > **Meta**: `186` Defined in: [index.d.ts:1532](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1532) meta key (also known as "windows", "super", and "command") *** ### MicMute > **MicMute**: `286` Defined in: [index.d.ts:1647](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1647) microphone mute toggle on linux *** ### MissionControl > **MissionControl**: `187` Defined in: [index.d.ts:1534](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1534) Opens mission control *** ### ModeChange > **ModeChange**: `188` Defined in: [index.d.ts:1535](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1535) *** ### Multiply > **Multiply**: `189` Defined in: [index.d.ts:1536](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1536) *** ### N > **N**: `23` Defined in: [index.d.ts:1333](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1333) *** ### NavigationAccept > **NavigationAccept**: `190` Defined in: [index.d.ts:1537](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1537) *** ### NavigationCancel > **NavigationCancel**: `191` Defined in: [index.d.ts:1538](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1538) *** ### NavigationDown > **NavigationDown**: `192` Defined in: [index.d.ts:1539](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1539) *** ### NavigationLeft > **NavigationLeft**: `193` Defined in: [index.d.ts:1540](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1540) *** ### NavigationMenu > **NavigationMenu**: `194` Defined in: [index.d.ts:1541](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1541) *** ### NavigationRight > **NavigationRight**: `195` Defined in: [index.d.ts:1542](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1542) *** ### NavigationUp > **NavigationUp**: `196` Defined in: [index.d.ts:1543](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1543) *** ### NavigationView > **NavigationView**: `197` Defined in: [index.d.ts:1544](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1544) *** ### NoName > **NoName**: `198` Defined in: [index.d.ts:1545](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1545) *** ### NonConvert > **NonConvert**: `199` Defined in: [index.d.ts:1546](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1546) *** ### None > **None**: `200` Defined in: [index.d.ts:1547](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1547) *** ### Num0 > **Num0**: `0` Defined in: [index.d.ts:1310](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1310) *** ### Num1 > **Num1**: `1` Defined in: [index.d.ts:1311](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1311) *** ### Num2 > **Num2**: `2` Defined in: [index.d.ts:1312](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1312) *** ### Num3 > **Num3**: `3` Defined in: [index.d.ts:1313](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1313) *** ### Num4 > **Num4**: `4` Defined in: [index.d.ts:1314](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1314) *** ### Num5 > **Num5**: `5` Defined in: [index.d.ts:1315](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1315) *** ### Num6 > **Num6**: `6` Defined in: [index.d.ts:1316](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1316) *** ### Num7 > **Num7**: `7` Defined in: [index.d.ts:1317](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1317) *** ### Num8 > **Num8**: `8` Defined in: [index.d.ts:1318](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1318) *** ### Num9 > **Num9**: `9` Defined in: [index.d.ts:1319](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1319) *** ### Numlock > **Numlock**: `201` Defined in: [index.d.ts:1549](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1549) Num lock *** ### Numpad0 > **Numpad0**: `202` Defined in: [index.d.ts:1550](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1550) *** ### Numpad1 > **Numpad1**: `203` Defined in: [index.d.ts:1551](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1551) *** ### Numpad2 > **Numpad2**: `204` Defined in: [index.d.ts:1552](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1552) *** ### Numpad3 > **Numpad3**: `205` Defined in: [index.d.ts:1553](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1553) *** ### Numpad4 > **Numpad4**: `206` Defined in: [index.d.ts:1554](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1554) *** ### Numpad5 > **Numpad5**: `207` Defined in: [index.d.ts:1555](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1555) *** ### Numpad6 > **Numpad6**: `208` Defined in: [index.d.ts:1556](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1556) *** ### Numpad7 > **Numpad7**: `209` Defined in: [index.d.ts:1557](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1557) *** ### Numpad8 > **Numpad8**: `210` Defined in: [index.d.ts:1558](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1558) *** ### Numpad9 > **Numpad9**: `211` Defined in: [index.d.ts:1559](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1559) *** ### NumpadEnter > **NumpadEnter**: `212` Defined in: [index.d.ts:1560](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1560) *** ### O > **O**: `24` Defined in: [index.d.ts:1334](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1334) *** ### OEM1 > **OEM1**: `213` Defined in: [index.d.ts:1561](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1561) *** ### OEM102 > **OEM102**: `214` Defined in: [index.d.ts:1562](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1562) *** ### OEM2 > **OEM2**: `215` Defined in: [index.d.ts:1563](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1563) *** ### OEM3 > **OEM3**: `216` Defined in: [index.d.ts:1564](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1564) *** ### OEM4 > **OEM4**: `217` Defined in: [index.d.ts:1565](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1565) *** ### OEM5 > **OEM5**: `218` Defined in: [index.d.ts:1566](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1566) *** ### OEM6 > **OEM6**: `219` Defined in: [index.d.ts:1567](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1567) *** ### OEM7 > **OEM7**: `220` Defined in: [index.d.ts:1568](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1568) *** ### OEM8 > **OEM8**: `221` Defined in: [index.d.ts:1569](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1569) *** ### OEMAttn > **OEMAttn**: `222` Defined in: [index.d.ts:1570](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1570) *** ### OEMAuto > **OEMAuto**: `223` Defined in: [index.d.ts:1571](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1571) *** ### OEMAx > **OEMAx**: `224` Defined in: [index.d.ts:1572](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1572) *** ### OEMBacktab > **OEMBacktab**: `225` Defined in: [index.d.ts:1573](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1573) *** ### OEMClear > **OEMClear**: `226` Defined in: [index.d.ts:1574](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1574) *** ### OEMComma > **OEMComma**: `227` Defined in: [index.d.ts:1575](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1575) *** ### OEMCopy > **OEMCopy**: `228` Defined in: [index.d.ts:1576](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1576) *** ### OEMCusel > **OEMCusel**: `229` Defined in: [index.d.ts:1577](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1577) *** ### OEMEnlw > **OEMEnlw**: `230` Defined in: [index.d.ts:1578](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1578) *** ### OEMFinish > **OEMFinish**: `231` Defined in: [index.d.ts:1579](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1579) *** ### OEMFJJisho > **OEMFJJisho**: `232` Defined in: [index.d.ts:1580](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1580) *** ### OEMFJLoya > **OEMFJLoya**: `233` Defined in: [index.d.ts:1581](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1581) *** ### OEMFJMasshou > **OEMFJMasshou**: `234` Defined in: [index.d.ts:1582](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1582) *** ### OEMFJRoya > **OEMFJRoya**: `235` Defined in: [index.d.ts:1583](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1583) *** ### OEMFJTouroku > **OEMFJTouroku**: `236` Defined in: [index.d.ts:1584](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1584) *** ### OEMJump > **OEMJump**: `237` Defined in: [index.d.ts:1585](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1585) *** ### OEMMinus > **OEMMinus**: `238` Defined in: [index.d.ts:1586](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1586) *** ### OEMNECEqual > **OEMNECEqual**: `239` Defined in: [index.d.ts:1587](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1587) *** ### OEMPA1 > **OEMPA1**: `240` Defined in: [index.d.ts:1588](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1588) *** ### OEMPA2 > **OEMPA2**: `241` Defined in: [index.d.ts:1589](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1589) *** ### OEMPA3 > **OEMPA3**: `242` Defined in: [index.d.ts:1590](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1590) *** ### OEMPeriod > **OEMPeriod**: `243` Defined in: [index.d.ts:1591](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1591) *** ### OEMPlus > **OEMPlus**: `244` Defined in: [index.d.ts:1592](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1592) *** ### OEMReset > **OEMReset**: `245` Defined in: [index.d.ts:1593](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1593) *** ### OEMWsctrl > **OEMWsctrl**: `246` Defined in: [index.d.ts:1594](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1594) *** ### Option > **Option**: `247` Defined in: [index.d.ts:1596](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1596) option key on macOS (alt key on Linux and Windows) *** ### Other > **Other**: `291` Defined in: [index.d.ts:1654](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1654) Use `key_other` to provide the raw key value. *** ### P > **P**: `25` Defined in: [index.d.ts:1335](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1335) *** ### PA1 > **PA1**: `248` Defined in: [index.d.ts:1597](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1597) *** ### Packet > **Packet**: `249` Defined in: [index.d.ts:1598](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1598) *** ### PageDown > **PageDown**: `250` Defined in: [index.d.ts:1600](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1600) page down key *** ### PageUp > **PageUp**: `251` Defined in: [index.d.ts:1602](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1602) page up key *** ### Pause > **Pause**: `252` Defined in: [index.d.ts:1603](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1603) *** ### Play > **Play**: `253` Defined in: [index.d.ts:1604](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1604) *** ### Power > **Power**: `254` Defined in: [index.d.ts:1605](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1605) *** ### Print > **Print**: `255` Defined in: [index.d.ts:1607](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1607) Print key (e.g. print screen / `SysRq` on some keyboards) *** ### PrintScr > **PrintScr**: `256` Defined in: [index.d.ts:1609](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1609) Take a screenshot *** ### Processkey > **Processkey**: `257` Defined in: [index.d.ts:1610](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1610) *** ### Q > **Q**: `26` Defined in: [index.d.ts:1336](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1336) *** ### R > **R**: `27` Defined in: [index.d.ts:1337](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1337) *** ### RButton > **RButton**: `258` Defined in: [index.d.ts:1611](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1611) *** ### RCommand > **RCommand**: `259` Defined in: [index.d.ts:1612](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1612) *** ### RControl > **RControl**: `260` Defined in: [index.d.ts:1613](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1613) *** ### Redo > **Redo**: `261` Defined in: [index.d.ts:1614](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1614) *** ### Return > **Return**: `262` Defined in: [index.d.ts:1616](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1616) return key *** ### RightArrow > **RightArrow**: `263` Defined in: [index.d.ts:1618](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1618) right arrow key *** ### RMenu > **RMenu**: `264` Defined in: [index.d.ts:1619](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1619) *** ### ROption > **ROption**: `265` Defined in: [index.d.ts:1620](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1620) *** ### RShift > **RShift**: `266` Defined in: [index.d.ts:1621](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1621) *** ### RWin > **RWin**: `267` Defined in: [index.d.ts:1622](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1622) *** ### S > **S**: `28` Defined in: [index.d.ts:1338](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1338) *** ### ScriptSwitch > **ScriptSwitch**: `271` Defined in: [index.d.ts:1626](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1626) *** ### Scroll > **Scroll**: `268` Defined in: [index.d.ts:1623](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1623) *** ### ScrollLock > **ScrollLock**: `269` Defined in: [index.d.ts:1624](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1624) *** ### Select > **Select**: `270` Defined in: [index.d.ts:1625](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1625) *** ### Separator > **Separator**: `272` Defined in: [index.d.ts:1627](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1627) *** ### Shift > **Shift**: `273` Defined in: [index.d.ts:1629](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1629) shift key *** ### ShiftLock > **ShiftLock**: `274` Defined in: [index.d.ts:1631](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1631) Lock shift key *** ### Sleep > **Sleep**: `275` Defined in: [index.d.ts:1632](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1632) *** ### Space > **Space**: `276` Defined in: [index.d.ts:1634](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1634) space key *** ### Subtract > **Subtract**: `277` Defined in: [index.d.ts:1635](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1635) *** ### SysReq > **SysReq**: `278` Defined in: [index.d.ts:1636](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1636) *** ### T > **T**: `29` Defined in: [index.d.ts:1339](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1339) *** ### Tab > **Tab**: `279` Defined in: [index.d.ts:1638](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1638) tab key (tabulator) *** ### U > **U**: `30` Defined in: [index.d.ts:1340](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1340) *** ### Undo > **Undo**: `280` Defined in: [index.d.ts:1639](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1639) *** ### Unicode > **Unicode**: `290` Defined in: [index.d.ts:1652](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1652) Use `key_unicode` to provide the character. *** ### UpArrow > **UpArrow**: `281` Defined in: [index.d.ts:1641](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1641) up arrow key *** ### V > **V**: `31` Defined in: [index.d.ts:1341](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1341) *** ### VidMirror > **VidMirror**: `282` Defined in: [index.d.ts:1642](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1642) *** ### VolumeDown > **VolumeDown**: `283` Defined in: [index.d.ts:1643](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1643) *** ### VolumeMute > **VolumeMute**: `284` Defined in: [index.d.ts:1644](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1644) *** ### VolumeUp > **VolumeUp**: `285` Defined in: [index.d.ts:1645](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1645) *** ### W > **W**: `32` Defined in: [index.d.ts:1342](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1342) *** ### X > **X**: `33` Defined in: [index.d.ts:1343](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1343) *** ### XButton1 > **XButton1**: `287` Defined in: [index.d.ts:1648](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1648) *** ### XButton2 > **XButton2**: `288` Defined in: [index.d.ts:1649](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1649) *** ### Y > **Y**: `34` Defined in: [index.d.ts:1344](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1344) *** ### Z > **Z**: `35` Defined in: [index.d.ts:1345](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1345) *** ### Zoom > **Zoom**: `289` Defined in: [index.d.ts:1650](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1650) # TraversalOrder Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/TraversalOrder # Enumeration: TraversalOrder Defined in: [index.d.ts:1681](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1681) Tree traversal order for `AccessibilityTree.find()`. ## Enumeration Members ### BreadthFirst > **BreadthFirst**: `1` Defined in: [index.d.ts:1685](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1685) Level-order breadth-first (parents before children). *** ### DepthFirst > **DepthFirst**: `0` Defined in: [index.d.ts:1683](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1683) Pre-order depth-first (each node before its descendants). # Visibility Source: https://docs.simular.ai/simulang-js/api/latest/enumerations/Visibility # Enumeration: Visibility Defined in: [index.d.ts:1689](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1689) Visibility behavior when opening an application. ## Enumeration Members ### Hidden > **Hidden**: `0` Defined in: [index.d.ts:1691](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1691) Launch hidden when supported by the platform. *** ### Show > **Show**: `1` Defined in: [index.d.ts:1693](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1693) Launch in a visible state. # AriaRoleToString Source: https://docs.simular.ai/simulang-js/api/latest/functions/ariaRoleToString # Function: ariaRoleToString() > **ariaRoleToString**(`role`): `string` Defined in: [index.d.ts:1192](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1192) Lowercase ARIA name for a role β€” matches the form used in snapshot output and accepted by `AccessibilityTree.find()`. `AriaRole` is exposed to JS as a numeric enum, so the usual TypeScript reverse-mapping trick (`AriaRole[role]`) does not work; use this function instead. ## Parameters ### role [`AriaRole`](../enumerations/AriaRole.mdx) ## Returns `string` # EnableAccessibilityForFrontmostApp Source: https://docs.simular.ai/simulang-js/api/latest/functions/enableAccessibilityForFrontmostApp # Function: enableAccessibilityForFrontmostApp() > **enableAccessibilityForFrontmostApp**(): `void` Defined in: [index.d.ts:1232](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1232) Enables the accessibility tree for the frontmost application. ## Returns `void` # HasScreenCapturePermission Source: https://docs.simular.ai/simulang-js/api/latest/functions/hasScreenCapturePermission # Function: hasScreenCapturePermission() > **hasScreenCapturePermission**(): `boolean` Defined in: [index.d.ts:1245](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1245) ## Returns `boolean` # InitLogger Source: https://docs.simular.ai/simulang-js/api/latest/functions/initLogger # Function: initLogger() > **initLogger**(`cb?`, `spec?`): `void` Defined in: [index.d.ts:1286](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1286) Initialize the logger. **You usually don't need to call this.** The package's `main` entry (`wrapped.js`) calls `initLogger()` with no arguments on first evaluation, so simply `import '@simular-ai/simulang-js'` is enough to see `[level] message` records on stderr. Call this directly only when you want to *override* that default β€” to forward records to a JS callback, change the filter spec, or silence everything. * **No callback** (`initLogger()` or `initLogger(null, spec)`): records are formatted as `[level] message` and written to stderr. * **With a callback** (`initLogger(cb, spec)`): records are forwarded to the JS callback via a non-blocking, unref'd threadsafe function. Use this for GUI panels, file appenders, or routing through a logging library like pino. The unref'd dispatch means the logger does not keep the Node event loop alive on its own. Omit `spec` to read `RUST_LOG` (falls back to `"simulang_rs=info,warn"` when `RUST_LOG` is unset β€” info-level records from simulang's own actions, warn-level from every other crate). Pass an explicit `spec` to override `RUST_LOG`. Syntax is identical to `RUST_LOG`: * `"info"` β€” global level * `"simulang_rs=debug,warn"` β€” per-module override + default * `"simulang_rs::windows=trace,simulang_rs::macos=debug,warn"` β€” multiple * `"off"` β€” disable all logging Safe to call repeatedly: each call atomically swaps the inner sink and filter β€” useful for e.g. starting on stderr at boot and switching to a renderer callback once the UI is ready. **Don't log from inside the callback.** Whether directly (`console.log` is fine β€” that's not a `log::*!` call) or transitively via another `simulang-js` function whose Rust side emits a record, you'd feed the relay another record, which queues another callback invocation, and so on forever. The callback itself runs on the Node main thread; the non-blocking dispatch from Rust is what creates the recursion risk. ## Parameters ### cb? ((`arg`) => `unknown`) | `null` ### spec? `string` | `null` ## Returns `void` # KeyFromString Source: https://docs.simular.ai/simulang-js/api/latest/functions/keyFromString # Function: keyFromString() > **keyFromString**(`value`): [`Key`](../enumerations/Key.mdx) Defined in: [index.d.ts:1658](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1658) Convert a string representation into a `Key`. ## Parameters ### value `string` ## Returns [`Key`](../enumerations/Key.mdx) # LegacyOpen Source: https://docs.simular.ai/simulang-js/api/latest/functions/legacyOpen # Function: legacyOpen() > **legacyOpen**(`app`, `url`, `focusPolicy`, `visibility`): `void` Defined in: [index.d.ts:1661](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1661) Legacy helper used by Electron to open an app or URL. ## Parameters ### app `string` | `null` | `undefined` ### url `string` | `null` | `undefined` ### focusPolicy [`FocusPolicy`](../enumerations/FocusPolicy.mdx) ### visibility [`Visibility`](../enumerations/Visibility.mdx) ## Returns `void` # LegacyTakeScreenshot Source: https://docs.simular.ai/simulang-js/api/latest/functions/legacyTakeScreenshot # Function: legacyTakeScreenshot() > **legacyTakeScreenshot**(`needsCompression`, `shrinkTo1080P`): `string` Defined in: [index.d.ts:1664](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1664) Legacy helper used by Electron to capture a screenshot as base64. ## Parameters ### needsCompression `boolean` ### shrinkTo1080P `boolean` ## Returns `string` # ReadFile Source: https://docs.simular.ai/simulang-js/api/latest/functions/readFile # Function: readFile() > **readFile**(`path`): `string` Defined in: [index.d.ts:1672](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1672) Reads a file and returns its trimmed contents. If the path is relative, it is resolved against the default cache location. ## Parameters ### path `string` ## Returns `string` # ScreenshotCropped Source: https://docs.simular.ai/simulang-js/api/latest/functions/screenshotCropped # Function: screenshotCropped() > **screenshotCropped**(`x`, `y`, `width`, `height`, `hideCursor`): [`Screenshot`](../classes/Screenshot.mdx) Defined in: [index.d.ts:1675](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1675) Takes the screenshot of a cropped region of the workspace. ## Parameters ### x `number` ### y `number` ### width `number` ### height `number` ### hideCursor `boolean` ## Returns [`Screenshot`](../classes/Screenshot.mdx) # ScreenshotFull Source: https://docs.simular.ai/simulang-js/api/latest/functions/screenshotFull # Function: screenshotFull() > **screenshotFull**(`hideCursor`, `screen`): [`Screenshot`](../classes/Screenshot.mdx) Defined in: [index.d.ts:1678](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1678) Takes the screenshot of the entire selected screen ## Parameters ### hideCursor `boolean` ### screen [`Screen`](../classes/Screen.mdx) ## Returns [`Screenshot`](../classes/Screenshot.mdx) # WriteFile Source: https://docs.simular.ai/simulang-js/api/latest/functions/writeFile # Function: writeFile() > **writeFile**(`path`, `content`, `append`): `string` Defined in: [index.d.ts:1704](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1704) Writes content to a file, returning the absolute path written to. If the path is relative, it is resolved against the default cache location. When `append` is true and the file already has content, a newline is inserted before appending the new content. When `append` is false, the file is overwritten. ## Parameters ### path `string` ### content `string` ### append `boolean` ## Returns `string` # Latest Source: https://docs.simular.ai/simulang-js/api/latest/index # `@simular-ai/simulang-js` ![CI](https://github.com/simular-ai/simulang-js/workflows/CI/badge.svg) Node.js bindings for [`simulang-rs`](https://github.com/simular-ai/simulang-rs), a Rust crate published by [Simular](https://simular.ai), built with [`napi-rs`](https://napi.rs/). Provides high-level primitives for desktop automation β€” keyboard and mouse input, screenshots, clipboard access, audio capture, accessibility-tree inspection, and more β€” exposed through idiomatic JavaScript. Ships TypeScript definitions auto-generated from the Rust source, so the types always match runtime behavior. ## Install ```bash theme={null} npm install @simular-ai/simulang-js ``` Prebuilt native binaries are published for: | Platform | Architecture | | -------- | ----------------------------------- | | macOS | `aarch64` (Apple Silicon), `x86_64` | | Windows | `x86_64`, `aarch64` | | Linux | `x86_64`, `aarch64` (glibc) | Node.js **20 or newer** is required. If your platform isn't covered, see [Building from source](#building-from-source). ### Optional β€” install the log viewer The [`log-window.mjs`](_media/log-window.mjs) example uses [`@simular-ai/simulang-log-viewer`](https://github.com/simular-ai/simulang-log-viewer), which is declared as an **optional peer dependency** and **not** installed by default. Install it only if you want to run that example or use the same pattern in your own code: ```bash theme={null} npm install @simular-ai/simulang-log-viewer ``` ## Usage Try the included [`google_search.mjs`](_media/google_search.mjs) example β€” it opens Google in Chrome, enables the accessibility tree, takes a screenshot, and displays it: ```bash theme={null} # With the simulang CLI (no local install needed): npm install -g @simular-ai/simulang simulang run examples/google_search.mjs # Or directly with Node.js if you have simulang-js installed locally: node examples/google_search.mjs ``` ## API documentation Browse the [API reference](https://docs.simular.ai/simulang-js/api/latest/) for more details. A bleeding-edge preview of HEAD on `main` is also published to [GitHub Pages](https://simular-ai.github.io/simulang-js/) between releases. ## Using with Claude Code This package ships a short [`CLAUDE.md`](_media/CLAUDE.md) inside the npm tarball that points Claude Code at `index.d.ts` as the source of truth for the API and adds a few cross-cutting notes that types alone can't express (lifetime rules, coordinate system, etc.). Wire it into your project's `CLAUDE.md` with: ```bash theme={null} npx simulang-init-claude # appends to /CLAUDE.md (creates it if missing) npx simulang-init-claude --user # appends to ~/.claude/CLAUDE.md instead npx simulang-init-claude --check # report status, don't write ``` The added line is a single `@./node_modules/@simular-ai/simulang-js/CLAUDE.md` import inside a sentinel-delimited block β€” safe to re-run, no-op when already present. ## Relationship to `simulang` [`@simular-ai/simulang`](https://github.com/simular-ai/simulang-cli) is a CLI that runs desktop automation scripts (`.ts`, `.js`, `.simulang`) using this package. It bundles `simulang-js` and re-exports the full API to scripts, so you can write and run automation scripts without a build step: ```bash theme={null} npm install -g @simular-ai/simulang simulang run my-script.js ``` `simulang-js` is the underlying primitive library; `simulang` is the batteries-included script runner built on top of it. If you are embedding desktop automation into your own Node.js application, depend on `simulang-js` directly. If you just want to run standalone automation scripts, `simulang` is the easier starting point. You can also point `simulang` at a local `simulang-js` checkout during development: ```bash theme={null} simulang run --simulang-js=/path/to/simulang-js my-script.js ``` ## Enumerations | Enumeration | Description | | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | [AriaRole](enumerations/AriaRole.mdx) | Cross-platform ARIA / Playwright role. Used as the `role` field on accessibility snapshots and as the search key in \[`AccessibilityTree::find`]. | | [Button](enumerations/Button.mdx) | Represents a mouse button. | | [Coordinate](enumerations/Coordinate.mdx) | Specifies if coordinates are relative or absolute. | | [Direction](enumerations/Direction.mdx) | The direction of a button event. | | [FocusPolicy](enumerations/FocusPolicy.mdx) | Focus behavior when opening an application. | | [Key](enumerations/Key.mdx) | Represents a keyboard key. | | [TraversalOrder](enumerations/TraversalOrder.mdx) | Tree traversal order for `AccessibilityTree.find()`. | | [Visibility](enumerations/Visibility.mdx) | Visibility behavior when opening an application. | ## Classes | Class | Description | | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [AccessibilityNode](classes/AccessibilityNode.mdx) | A node in the platform accessibility tree. Thin binding for `simulang_rs::AXNode` (macOS `AXUIElement` / Windows UIA element / Linux AT-SPI accessible). | | [AccessibilityTree](classes/AccessibilityTree.mdx) | Accessibility tree bound to a specific window. Provides snapshot and ref-based actions for desktop automation (Windows UIA). | | [App](classes/App.mdx) | Represents an application that can be opened. | | [AskModel](classes/AskModel.mdx) | A free-form chat-completions LLM (optionally vision-capable) β€” the JS analogue of the `ask` primitive. | | [AudioOutput](classes/AudioOutput.mdx) | Handle to an open audio output device. Must be kept alive for playback to continue β€” when dropped all associated `Player`s stop producing sound. | | [Clipboard](classes/Clipboard.mdx) | Contains functions to read and write the clipboard. | | [Directory](classes/Directory.mdx) | Represents a directory handle. | | [File](classes/File.mdx) | Represents a file handle. | | [GroundingModel](classes/GroundingModel.mdx) | A visual-language grounding model that can locate concepts on images. | | [Image](classes/Image.mdx) | Represents an image. | | [Instance](classes/Instance.mdx) | Represents an opened application instance. | | [KeyboardController](classes/KeyboardController.mdx) | Contains functions to simulate key presses/releases and to input text. | | [LoopbackSource](classes/LoopbackSource.mdx) | A loopback capture source that records system audio output (what the user hears through their speakers or headphones). | | [MouseController](classes/MouseController.mdx) | Contains functions to control the mouse and to get the location of the cursor. A cartesian coordinate system is used for specifying coordinates. The origin is located in the top-left corner of the current screen, with positive values extending along the axes down and to the right of the origin point and it is measured in pixels. The same coordinate system is used on all operating systems. | | [Player](classes/Player.mdx) | Handle to a device that outputs sounds. | | [SamplesBuffer](classes/SamplesBuffer.mdx) | A buffer of samples treated as a source. | | [Screen](classes/Screen.mdx) | Represents a physical display/screen. | | [Screenshot](classes/Screenshot.mdx) | Represents a screenshot capture. | | [ScreenshotCoordinateType](classes/ScreenshotCoordinateType.mdx) | Describes how `(x, y)` coordinates passed to `Screenshot.toGlobalPhysicalPixels` should be interpreted. | | [SttModel](classes/SttModel.mdx) | A speech-to-text model that can transcribe audio. | | [System](classes/System.mdx) | Provides system-wide operations. | | [Window](classes/Window.mdx) | Handle to an on-screen window. Constructed via \[`Window.all`] or \[`Window.allForPid`] and exposes read-only metadata (`title`, `pid`) alongside basic actions (`minimize`, `maximize`, `close`). | ## Interfaces | Interface | Description | | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | [AccessibilityNodeJs](interfaces/AccessibilityNodeJs.mdx) | - | | [BoundingBox](interfaces/BoundingBox.mdx) | Axis-aligned rectangle. `right` and `bottom` are exclusive (Playwright / DOM convention), so the box covers `[left, right) Γ— [top, bottom)`. | | [JsLogRecord](interfaces/JsLogRecord.mdx) | A single log entry forwarded to the JS callback. | ## Functions | Function | Description | | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | [ariaRoleToString](functions/ariaRoleToString.mdx) | Lowercase ARIA name for a role β€” matches the form used in snapshot output and accepted by `AccessibilityTree.find()`. | | [enableAccessibilityForFrontmostApp](functions/enableAccessibilityForFrontmostApp.mdx) | Enables the accessibility tree for the frontmost application. | | [hasScreenCapturePermission](functions/hasScreenCapturePermission.mdx) | - | | [initLogger](functions/initLogger.mdx) | Initialize the logger. | | [keyFromString](functions/keyFromString.mdx) | Convert a string representation into a `Key`. | | [legacyOpen](functions/legacyOpen.mdx) | Legacy helper used by Electron to open an app or URL. | | [legacyTakeScreenshot](functions/legacyTakeScreenshot.mdx) | Legacy helper used by Electron to capture a screenshot as base64. | | [readFile](functions/readFile.mdx) | Reads a file and returns its trimmed contents. | | [screenshotCropped](functions/screenshotCropped.mdx) | Takes the screenshot of a cropped region of the workspace. | | [screenshotFull](functions/screenshotFull.mdx) | Takes the screenshot of the entire selected screen | | [writeFile](functions/writeFile.mdx) | Writes content to a file, returning the absolute path written to. | # AccessibilityNodeJs Source: https://docs.simular.ai/simulang-js/api/latest/interfaces/AccessibilityNodeJs # Interface: AccessibilityNodeJs Defined in: [index.d.ts:1071](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1071) ## Properties ### automationId > **automationId**: `string` Defined in: [index.d.ts:1081](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1081) *** ### boundingBox > **boundingBox**: [`BoundingBox`](BoundingBox.mdx) Defined in: [index.d.ts:1083](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1083) *** ### children > **children**: `AccessibilityNodeJs`\[] Defined in: [index.d.ts:1084](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1084) *** ### className > **className**: `string` Defined in: [index.d.ts:1074](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1074) *** ### controlType > **controlType**: `number` Defined in: [index.d.ts:1075](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1075) *** ### description > **description**: `string` Defined in: [index.d.ts:1077](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1077) *** ### helpText > **helpText**: `string` Defined in: [index.d.ts:1079](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1079) *** ### isEnabled > **isEnabled**: `boolean` Defined in: [index.d.ts:1082](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1082) *** ### localizedControlType > **localizedControlType**: `string` Defined in: [index.d.ts:1076](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1076) *** ### name > **name**: `string` Defined in: [index.d.ts:1073](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1073) *** ### overallDescription > **overallDescription**: `string` Defined in: [index.d.ts:1078](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1078) *** ### refId? > `optional` **refId?**: `number` Defined in: [index.d.ts:1085](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1085) *** ### role > **role**: [`AriaRole`](../enumerations/AriaRole.mdx) Defined in: [index.d.ts:1072](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1072) *** ### value > **value**: `string` Defined in: [index.d.ts:1080](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1080) # BoundingBox Source: https://docs.simular.ai/simulang-js/api/latest/interfaces/BoundingBox # Interface: BoundingBox Defined in: [index.d.ts:1198](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1198) Axis-aligned rectangle. `right` and `bottom` are exclusive (Playwright / DOM convention), so the box covers `[left, right) Γ— [top, bottom)`. ## Properties ### bottom > **bottom**: `number` Defined in: [index.d.ts:1202](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1202) *** ### left > **left**: `number` Defined in: [index.d.ts:1199](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1199) *** ### right > **right**: `number` Defined in: [index.d.ts:1201](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1201) *** ### top > **top**: `number` Defined in: [index.d.ts:1200](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1200) # JsLogRecord Source: https://docs.simular.ai/simulang-js/api/latest/interfaces/JsLogRecord # Interface: JsLogRecord Defined in: [index.d.ts:1289](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1289) A single log entry forwarded to the JS callback. ## Properties ### file? > `optional` **file?**: `string` Defined in: [index.d.ts:1301](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1301) Source file path of the call site, when available. *** ### level > **level**: `string` Defined in: [index.d.ts:1291](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1291) `"error"`, `"warn"`, `"info"`, `"debug"`, or `"trace"`. *** ### line? > `optional` **line?**: `number` Defined in: [index.d.ts:1303](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1303) 1-based line number of the call site, when available. *** ### message > **message**: `string` Defined in: [index.d.ts:1299](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1299) The formatted log message. *** ### modulePath? > `optional` **modulePath?**: `string` Defined in: [index.d.ts:1305](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1305) Module path of the call site, when available. *** ### target > **target**: `string` Defined in: [index.d.ts:1297](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1297) Logger target β€” defaults to the emitting Rust module path (e.g. `"simulang_rs::windows::app"`). Used by the filter spec to gate logs per module. # AccessibilityNode Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/AccessibilityNode # Class: AccessibilityNode Defined in: [index.d.ts:14](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L14) A node in the platform accessibility tree. Thin binding for `simulang_rs::AXNode` (macOS `AXUIElement` / Windows UIA element / Linux AT-SPI accessible). Construct via the static factories or via tree-walking methods on another node / `Instance` / `Window` (`children`, `find`, `scoredSearch`). Properties are resolved from the underlying accessibility framework on each access; the node itself is just a handle. ## Constructors ### Constructor > **new AccessibilityNode**(): `AccessibilityNode` #### Returns `AccessibilityNode` ## Accessors ### automationId #### Get Signature > **get** **automationId**(): `string` Defined in: [index.d.ts:41](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L41) UIA `AutomationId` (Windows). Empty on macOS / Linux. ##### Returns `string` *** ### className #### Get Signature > **get** **className**(): `string` Defined in: [index.d.ts:24](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L24) Platform class name (Windows UIA `ClassName` / macOS subrole). ##### Returns `string` *** ### controlType #### Get Signature > **get** **controlType**(): `number` Defined in: [index.d.ts:26](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L26) Numeric control type (`UIA_ControlTypeIds` on Windows, `0` on macOS). ##### Returns `number` *** ### description #### Get Signature > **get** **description**(): `string` Defined in: [index.d.ts:30](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L30) Short description (`AXDescription` / UIA `Name`-adjacent fields). ##### Returns `string` *** ### helpText #### Get Signature > **get** **helpText**(): `string` Defined in: [index.d.ts:37](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L37) Help text / tooltip. ##### Returns `string` *** ### isEnabled #### Get Signature > **get** **isEnabled**(): `boolean` Defined in: [index.d.ts:43](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L43) Whether the node accepts user input. ##### Returns `boolean` *** ### localizedControlType #### Get Signature > **get** **localizedControlType**(): `string` Defined in: [index.d.ts:28](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L28) Localized control type string. ##### Returns `string` *** ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:22](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L22) Accessible name (title / label). ##### Returns `string` *** ### overallDescription #### Get Signature > **get** **overallDescription**(): `string` Defined in: [index.d.ts:35](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L35) Synthetic, query-friendly description used by `scoredSearch` (combines the node's role, label, value, and a small amount of ancestor context). ##### Returns `string` *** ### role #### Get Signature > **get** **role**(): [`AriaRole`](../enumerations/AriaRole.mdx) Defined in: [index.d.ts:20](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L20) Cross-platform ARIA role. ##### Returns [`AriaRole`](../enumerations/AriaRole.mdx) *** ### value #### Get Signature > **get** **value**(): `string` Defined in: [index.d.ts:39](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L39) Current text value (textbox content, slider value as string, …). ##### Returns `string` ## Methods ### activate() > **activate**(): `void` Defined in: [index.d.ts:92](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L92) Invoke / click the element (button, link, menu item). #### Returns `void` *** ### boundingBox() > **boundingBox**(): [`BoundingBox`](../interfaces/BoundingBox.mdx) Defined in: [index.d.ts:48](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L48) Live bounding box of the element in global physical pixels. `right` and `bottom` are exclusive (Playwright / DOM convention). #### Returns [`BoundingBox`](../interfaces/BoundingBox.mdx) *** ### children() > **children**(): `AccessibilityNode`\[] Defined in: [index.d.ts:54](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L54) Direct child nodes. Returns an empty array if the subtree has been torn down or the children attribute is unreadable (matching simulang-rs's convention of treating walk failures as "no children"). #### Returns `AccessibilityNode`\[] *** ### expandCollapse() > **expandCollapse**(): `void` Defined in: [index.d.ts:100](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L100) Expand or collapse a dropdown or tree item. #### Returns `void` *** ### focus() > **focus**(): `void` Defined in: [index.d.ts:107](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L107) Move keyboard focus to this element (brings its window to the foreground as a side effect on most platforms). #### Returns `void` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): `AccessibilityNode`\[] Defined in: [index.d.ts:90](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L90) Search this subtree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Returns every node whose score equals the maximum found and exceeds `threshold` β€” same semantics as `simulang_rs::scored_search` with `BowJaccard::score(...).primary` as the scorer and a permissive filter. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns `AccessibilityNode`\[] *** ### scrollIntoView() > **scrollIntoView**(): `void` Defined in: [index.d.ts:102](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L102) Scroll the element into view. #### Returns `void` *** ### select() > **select**(): `void` Defined in: [index.d.ts:98](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L98) Select a tab, radio button, or list item. #### Returns `void` *** ### setValue() > **setValue**(`value`): `void` Defined in: [index.d.ts:94](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L94) Set the text value of the element (textbox, combobox, …). #### Parameters ##### value `string` #### Returns `void` *** ### snapshot() > **snapshot**(): `string` Defined in: [index.d.ts:64](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L64) Render this node's accessibility subtree as an indented Playwright-style aria snapshot string. One line per node, two spaces of indentation per depth level, in pre-order DFS. Roles are emitted raw (`AXWindow` on macOS, `UIA.ControlType.*` on Windows), with title and value appended when non-empty. #### Returns `string` *** ### supportedActions() > **supportedActions**(): `string`\[] Defined in: [index.d.ts:69](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L69) Human-readable names of the actions this node currently supports (e.g. `"activate"`, `"toggle"`, `"scroll_into_view"`). #### Returns `string`\[] *** ### toggle() > **toggle**(): `void` Defined in: [index.d.ts:96](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L96) Toggle a checkbox or switch. #### Returns `void` *** ### fromFocusedApplication() > `static` **fromFocusedApplication**(): `AccessibilityNode` Defined in: [index.d.ts:16](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L16) Root node of the currently focused application's accessibility tree. #### Returns `AccessibilityNode` *** ### fromPid() > `static` **fromPid**(`pid`): `AccessibilityNode` Defined in: [index.d.ts:18](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L18) Root node of the application identified by `pid`. #### Parameters ##### pid `number` #### Returns `AccessibilityNode` # AccessibilityTree Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/AccessibilityTree # Class: AccessibilityTree Defined in: [index.d.ts:114](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L114) Accessibility tree bound to a specific window. Provides snapshot and ref-based actions for desktop automation (Windows UIA). ## Constructors ### Constructor > **new AccessibilityTree**(): `AccessibilityTree` #### Returns `AccessibilityTree` ## Accessors ### windowId #### Get Signature > **get** **windowId**(): `number` Defined in: [index.d.ts:127](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L127) Get the window handle as an integer ID. ##### Returns `number` *** ### windowTitle #### Get Signature > **get** **windowTitle**(): `string` Defined in: [index.d.ts:125](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L125) Get the window title. ##### Returns `string` ## Methods ### activate() > **activate**(`refId`): `void` Defined in: [index.d.ts:145](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L145) Invoke/click an element (button, link, menuitem). #### Parameters ##### refId `number` #### Returns `void` *** ### clearRefs() > **clearRefs**(): `void` Defined in: [index.d.ts:163](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L163) Clear all stored element refs. #### Returns `void` *** ### expandCollapse() > **expandCollapse**(`refId`): `void` Defined in: [index.d.ts:153](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L153) Expand or collapse a dropdown or tree item. #### Parameters ##### refId `number` #### Returns `void` *** ### find() > **find**(`order`, `role?`, `name?`, `visibleOnly?`, `maxResults?`, `collapseStructural?`): [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx)\[] Defined in: [index.d.ts:186](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L186) Search the tree using the chosen traversal order. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `role` – keep nodes whose ARIA role equals this value (e.g. `AriaRole.Button`, `AriaRole.TabList`, `AriaRole.MenuBar`). Cross-platform ARIA roles, not the platform-native `UIA.ControlType.*` / `AX*` / `AT-SPI.Role.*` vocabulary. * `name` – keep nodes whose title or description contains this string * `visible_only` – skip invisible nodes (default `false`) * `max_results` – stop after this many matches (uses `.take()`) * `collapse_structural` – hoist empty structural wrappers (for example `Pane` / `Group` / `Custom` / `Document` on Windows, `AXGroup` / `AXGenericGroup` / `AXUnknown` on macOS, AT-SPI `Panel` / `Filler` / `Section` on Linux) out of the walk so role searches do not hit unnamed containers (default `false`) Clears existing refs; returned nodes carry `refId` values usable with action methods (`activate`, `setValue`, …). #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### role? [`AriaRole`](../enumerations/AriaRole.mdx) | `null` ##### name? `string` | `null` ##### visibleOnly? `boolean` | `null` ##### maxResults? `number` | `null` ##### collapseStructural? `boolean` | `null` #### Returns [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx)\[] *** ### focusElement() > **focusElement**(`refId`): `void` Defined in: [index.d.ts:157](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L157) Focus an element (brings window to foreground). #### Parameters ##### refId `number` #### Returns `void` *** ### getBounds() > **getBounds**(`refId`): [`BoundingBox`](../interfaces/BoundingBox.mdx) Defined in: [index.d.ts:159](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L159) Get the live bounding box of an element. #### Parameters ##### refId `number` #### Returns [`BoundingBox`](../interfaces/BoundingBox.mdx) *** ### getSupportedActions() > **getSupportedActions**(`refId`): `string`\[] Defined in: [index.d.ts:161](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L161) Get the list of supported actions for an element. #### Parameters ##### refId `number` #### Returns `string`\[] *** ### scrollIntoView() > **scrollIntoView**(`refId`): `void` Defined in: [index.d.ts:155](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L155) Scroll an element into view. #### Parameters ##### refId `number` #### Returns `void` *** ### select() > **select**(`refId`): `void` Defined in: [index.d.ts:151](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L151) Select a tab, radio button, or list item. #### Parameters ##### refId `number` #### Returns `void` *** ### setValue() > **setValue**(`refId`, `value`): `void` Defined in: [index.d.ts:147](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L147) Set the text value of an element (textbox, combobox). #### Parameters ##### refId `number` ##### value `string` #### Returns `void` *** ### snapshot() > **snapshot**(`visibleOnly?`): [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx) Defined in: [index.d.ts:143](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L143) Take a snapshot of the window's accessibility tree. `visible_only` (default `false`) controls whether nodes whose non-standard `AXVisible` attribute reads `false` are dropped from the result. `AXVisible` is a Chromium-specific extension; native macOS apps don't expose it, so the filter only matters for browser windows. Chrome reports many web-content nodes (including `AXLink`) as `AXVisible=false` because its accessibility-tree visibility is compositor-driven, not pixel-driven β€” setting `visible_only=true` on a Chrome window will silently drop most of the page including links. #### Parameters ##### visibleOnly? `boolean` | `null` #### Returns [`AccessibilityNodeJs`](../interfaces/AccessibilityNodeJs.mdx) *** ### toggle() > **toggle**(`refId`): `void` Defined in: [index.d.ts:149](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L149) Toggle a checkbox or switch. #### Parameters ##### refId `number` #### Returns `void` *** ### fromForeground() > `static` **fromForeground**(): `AccessibilityTree` Defined in: [index.d.ts:116](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L116) Create an accessibility tree bound to the current foreground window. #### Returns `AccessibilityTree` *** ### fromHwnd() > `static` **fromHwnd**(`hwnd`): `AccessibilityTree` Defined in: [index.d.ts:123](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L123) Create an accessibility tree from a platform-specific window identifier. On Windows this is an HWND; on macOS it is a PID. #### Parameters ##### hwnd `number` #### Returns `AccessibilityTree` *** ### fromPid() > `static` **fromPid**(`pid`): `AccessibilityTree` Defined in: [index.d.ts:118](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L118) Create an accessibility tree bound to the first visible window of a process. #### Parameters ##### pid `number` #### Returns `AccessibilityTree` # App Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/App # Class: App Defined in: [index.d.ts:190](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L190) Represents an application that can be opened. ## Constructors ### Constructor > **new App**(): `App` #### Returns `App` ## Accessors ### canonicalName #### Get Signature > **get** **canonicalName**(): `string` | `null` Defined in: [index.d.ts:194](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L194) Returns the canonical app name used for fuzzy matching. ##### Returns `string` | `null` *** ### launchTarget #### Get Signature > **get** **launchTarget**(): `string` | `null` Defined in: [index.d.ts:196](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L196) Returns the launch target used to open the app (name or path). ##### Returns `string` | `null` ## Methods ### open() > **open**(`url`, `focusPolicy`, `visibility`, `waitForLoadComplete`): [`Instance`](Instance.mdx) Defined in: [index.d.ts:217](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L217) Opens or switches to an application. If a URL is provided, the URL is opened with the specified app. `focus_policy` controls whether the app is allowed to become active/frontmost. Some applications (e.g. Chrome, Notes) ignore this request and steal focus regardless. `visibility` controls whether the app is launched hidden or shown. Some applications (e.g. Chrome and other Chromium/Electron apps) ignore the hidden flag and launch visibly, potentially stealing focus. In that case the app is hidden explicitly after launch. When `wait_for_load_complete` is true, this blocks for a short, fixed delay to allow the app or URL to become responsive before returning. #### Parameters ##### url `string` | `null` | `undefined` ##### focusPolicy [`FocusPolicy`](../enumerations/FocusPolicy.mdx) ##### visibility [`Visibility`](../enumerations/Visibility.mdx) ##### waitForLoadComplete `boolean` #### Returns [`Instance`](Instance.mdx) *** ### defaultBrowser() > `static` **defaultBrowser**(): `App` Defined in: [index.d.ts:198](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L198) Returns a handle to the system's default browser. #### Returns `App` *** ### exactName() > `static` **exactName**(`name`): `App` Defined in: [index.d.ts:192](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L192) Get the app by exact name. No fuzzy search is performed. #### Parameters ##### name `string` #### Returns `App` *** ### exists() > `static` **exists**(`app`): `boolean` Defined in: [index.d.ts:200](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L200) Checks if the app exists. #### Parameters ##### app `string` #### Returns `boolean` # AskModel Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/AskModel # Class: AskModel Defined in: [index.d.ts:229](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L229) A free-form chat-completions LLM (optionally vision-capable) β€” the JS analogue of the `ask` primitive. Given a `prompt`, optional accessibility/structural `text`, and zero or more `images`, \[`AskModel.ask`] returns the model's response as a plain string. The wire format is OpenAI-compatible chat completions, so any provider config that points at such an endpoint works. ## Constructors ### Constructor > **new AskModel**(): `AskModel` #### Returns `AskModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:250](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L250) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### ask() > **ask**(`prompt`, `text?`, `images?`): `string` Defined in: [index.d.ts:264](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L264) Ask the model a question, optionally grounded in accessibility text and/or images. * `prompt`: the question or task to answer. * `text`: optional accessibility-tree (or any) text included as structural context. Pass `null` / omit to skip. * `images`: zero or more images to attach. Each is encoded as a base64 data URL and sent as an `image_url` chat content part. Pass `null` / omit for none. Returns the trimmed assistant response on success. #### Parameters ##### prompt `string` ##### text? `string` | `null` ##### images? [`Image`](Image.mdx)\[] | `null` #### Returns `string` *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:248](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L248) Every LLM model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files) advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `AskModel` Defined in: [index.d.ts:241](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L241) Resolve a model alias against the loaded config (e.g. `"openrouter_gpt_4o_mini"` from the bundled `openrouter` provider, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `AskModel` *** ### default() > `static` **default**(): `AskModel` Defined in: [index.d.ts:235](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L235) First LLM model advertised by the first LLM-capable provider in the loaded configuration whose credentials are currently available. Throws if no provider in the loaded config advertises an LLM service. #### Returns `AskModel` # AudioOutput Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/AudioOutput # Class: AudioOutput Defined in: [index.d.ts:272](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L272) Handle to an open audio output device. Must be kept alive for playback to continue β€” when dropped all associated `Player`s stop producing sound. ## Constructors ### Constructor > **new AudioOutput**(): `AudioOutput` #### Returns `AudioOutput` ## Methods ### createPlayer() > **createPlayer**(): [`Player`](Player.mdx) Defined in: [index.d.ts:281](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L281) Creates a new `Player` attached to this output. #### Returns [`Player`](Player.mdx) *** ### openDefault() > `static` **openDefault**(): `AudioOutput` Defined in: [index.d.ts:279](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L279) Opens the default audio output device with its default configuration. If that fails, tries alternative configurations and non-default output devices. Returns the first configuration that succeeds. If all attempts fail, returns the initial error. #### Returns `AudioOutput` # Clipboard Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Clipboard # Class: Clipboard Defined in: [index.d.ts:285](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L285) Contains functions to read and write the clipboard. ## Constructors ### Constructor > **new Clipboard**(): `Clipboard` Defined in: [index.d.ts:286](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L286) #### Returns `Clipboard` ## Methods ### clear() > **clear**(): `void` Defined in: [index.d.ts:321](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L321) Clears all content from the clipboard, regardless of type. #### Returns `void` *** ### getImage() > **getImage**(): [`Image`](Image.mdx) | `null` Defined in: [index.d.ts:300](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L300) Gets the image content from the clipboard. Returns the clipboard image if available, or `null` if the clipboard doesn't contain image data. #### Returns [`Image`](Image.mdx) | `null` *** ### getString() > **getString**(): `string` | `null` Defined in: [index.d.ts:293](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L293) Gets the string content from the clipboard. Returns the clipboard string if available, or `null` if the clipboard doesn't contain string data or is empty. #### Returns `string` | `null` *** ### pasteText() > **pasteText**(`value`): `void` Defined in: [index.d.ts:332](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L332) Types text by pasting it from the clipboard. Saves the previous clipboard text and image (when present), sets the clipboard to the specified string, verifies it was set correctly, then simulates Command+V (or Ctrl+V) to paste it. After pasting, reapplies the saved snapshot (image is restored in preference to text when both were present). Other clipboard formats are not saved or restored. #### Parameters ##### value `string` #### Returns `void` *** ### setImage() > **setImage**(`image`): `string` | `null` Defined in: [index.d.ts:319](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L319) Replaces the contents of the clipboard with the given image. For example used to copy a screenshot to the clipboard. Returns the previous string content, or `null` if the clipboard was empty or had no string data. The clipboard is not automatically restored; the caller can use the returned value to restore it if desired. #### Parameters ##### image [`Image`](Image.mdx) #### Returns `string` | `null` *** ### setString() > **setString**(`value`): `string` | `null` Defined in: [index.d.ts:309](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L309) Replaces the contents of the clipboard with the given string. Returns the previous string content, or `null` if the clipboard was empty or had no string data. The clipboard is not automatically restored; the caller can use the returned value to restore it if desired. #### Parameters ##### value `string` #### Returns `string` | `null` # Directory Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Directory # Class: Directory Defined in: [index.d.ts:336](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L336) Represents a directory handle. ## Constructors ### Constructor > **new Directory**(`path`, `createMissing`): `Directory` Defined in: [index.d.ts:344](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L344) Creates a handle to a directory at the given path. If `create_missing` is true, the directory (and all missing ancestors) is created when it does not already exist. If false, the call fails when the directory does not exist. #### Parameters ##### path `string` ##### createMissing `boolean` #### Returns `Directory` ## Methods ### copyTo() > **copyTo**(`dest`): `Directory` Defined in: [index.d.ts:356](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L356) Copies the directory recursively to a new location. #### Parameters ##### dest `string` #### Returns `Directory` *** ### delete() > **delete**(): `void` Defined in: [index.d.ts:363](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L363) Deletes the directory recursively, invalidating the handle. #### Returns `void` *** ### isReadonly() > **isReadonly**(): `boolean` Defined in: [index.d.ts:384](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L384) Returns whether the directory is read-only. #### Returns `boolean` *** ### listDirs() > **listDirs**(): `Directory`\[] Defined in: [index.d.ts:375](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L375) Returns all subdirectories in this directory (non-recursive). Throws if any individual directory entry fails to read. #### Returns `Directory`\[] *** ### listFiles() > **listFiles**(): [`File`](File.mdx)\[] Defined in: [index.d.ts:369](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L369) Returns all files in this directory (non-recursive). Throws if any individual directory entry fails to read. #### Returns [`File`](File.mdx)\[] *** ### modified() > **modified**(): `number` Defined in: [index.d.ts:382](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L382) Returns the last modification time of the directory itself as milliseconds since the Unix epoch. #### Returns `number` *** ### moveTo() > **moveTo**(`dest`): `void` Defined in: [index.d.ts:361](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L361) Moves the directory to a new location Falls back to copy + delete for cross-device moves. #### Parameters ##### dest `string` #### Returns `void` *** ### name() > **name**(): `string` Defined in: [index.d.ts:377](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L377) Returns the directory name (last component of the path). #### Returns `string` *** ### path() > **path**(): `string` Defined in: [index.d.ts:352](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L352) Returns the resolved absolute path. #### Returns `string` *** ### rename() > **rename**(`newName`): `void` Defined in: [index.d.ts:354](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L354) Renames the directory in place (same parent directory) #### Parameters ##### newName `string` #### Returns `void` *** ### temp() > `static` **temp**(): `Directory` Defined in: [index.d.ts:350](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L350) Creates a directory with a unique name inside the system's temp directory, returning a handle to it. The directory is **not** automatically removed; call `delete()` when done. #### Returns `Directory` # File Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/File # Class: File Defined in: [index.d.ts:388](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L388) Represents a file handle. ## Constructors ### Constructor > **new File**(`path`, `createMissing`): `File` Defined in: [index.d.ts:396](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L396) Creates a handle to a file at the given path. If `create_missing` is true, the file (and all missing parent directories) is created when it does not already exist. If false, the call fails when the file does not exist. #### Parameters ##### path `string` ##### createMissing `boolean` #### Returns `File` ## Methods ### copyTo() > **copyTo**(`dest`): `File` Defined in: [index.d.ts:412](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L412) Copies the file to a new location, returning a handle to the copy. #### Parameters ##### dest `string` #### Returns `File` *** ### delete() > **delete**(): `void` Defined in: [index.d.ts:419](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L419) Deletes the file, invalidating the handle. #### Returns `void` *** ### extension() > **extension**(): `string` | `null` Defined in: [index.d.ts:423](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L423) Returns the file extension, if any. #### Returns `string` | `null` *** ### isReadonly() > **isReadonly**(): `boolean` Defined in: [index.d.ts:432](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L432) Returns whether the file is read-only. #### Returns `boolean` *** ### modified() > **modified**(): `number` Defined in: [index.d.ts:430](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L430) Returns the last modification time as milliseconds since the Unix epoch. #### Returns `number` *** ### moveTo() > **moveTo**(`dest`): `void` Defined in: [index.d.ts:417](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L417) Moves the file to a new location. Falls back to copy + delete for cross-device moves. #### Parameters ##### dest `string` #### Returns `void` *** ### name() > **name**(): `string` Defined in: [index.d.ts:421](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L421) Returns the file name (last component of the path). #### Returns `string` *** ### path() > **path**(): `string` Defined in: [index.d.ts:398](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L398) Returns the resolved absolute path. #### Returns `string` *** ### read() > **read**(): `string` Defined in: [index.d.ts:400](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L400) Reads the file and returns its trimmed contents. #### Returns `string` *** ### rename() > **rename**(`newName`): `void` Defined in: [index.d.ts:410](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L410) Renames the file in place (same parent directory). #### Parameters ##### newName `string` #### Returns `void` *** ### size() > **size**(): `number` Defined in: [index.d.ts:425](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L425) Returns the file size in bytes. #### Returns `number` *** ### write() > **write**(`content`, `append`): `void` Defined in: [index.d.ts:408](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L408) Writes content to the file. When `append` is true and the file already has content, a newline is inserted before appending. When `append` is false, the file is overwritten. Parent directories are created if needed. #### Parameters ##### content `string` ##### append `boolean` #### Returns `void` # GroundingModel Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/GroundingModel # Class: GroundingModel Defined in: [index.d.ts:436](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L436) A visual-language grounding model that can locate concepts on images. ## Constructors ### Constructor > **new GroundingModel**(): `GroundingModel` #### Returns `GroundingModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:466](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L466) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### ground() > **ground**(`target`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:480](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L480) Locate `concept` on `target` and return zero-based pixel coordinates `[x, y]`: * If `target` is an `Image`, coordinates are in **image-space**. Normalized model outputs are scaled linearly onto `[0, width - 1]` and `[0, height - 1]`. * If `target` is a `Screenshot`, coordinates are in **global physical screen space** β€” suitable to feed directly into primitives that expect global screen coordinates (e.g. `moveTo`, `clickAt`). Equivalent to `target.ground(model, concept)`. #### Parameters ##### target [`Image`](Image.mdx) | [`Screenshot`](Screenshot.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:464](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L464) Every VLM model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `GroundingModel` Defined in: [index.d.ts:448](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L448) Resolve a model alias against the loaded config (e.g. `"ui_venus_30b"`, `"ui_tars_7b"`, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `GroundingModel` *** ### default() > `static` **default**(): `GroundingModel` Defined in: [index.d.ts:442](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L442) First VLM model advertised by the first VLM provider in the loaded config. Throws if no provider in the loaded config advertises a VLM service. #### Returns `GroundingModel` *** ### uiTars7B() > `static` **uiTars7B**(): `GroundingModel` Defined in: [index.d.ts:453](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L453) Convenience shim for the bundled `ui_tars_7b` alias. Throws if no provider advertises that alias. #### Returns `GroundingModel` *** ### uiVenus30B() > `static` **uiVenus30B**(): `GroundingModel` Defined in: [index.d.ts:458](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L458) Convenience shim for the bundled `ui_venus_30b` alias. Throws if no provider advertises that alias. #### Returns `GroundingModel` # Image Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Image # Class: Image Defined in: [index.d.ts:484](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L484) Represents an image. ## Constructors ### Constructor > **new Image**(): `Image` #### Returns `Image` ## Accessors ### dimensions #### Get Signature > **get** **dimensions**(): \[`number`, `number`] Defined in: [index.d.ts:513](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L513) Returns the image dimensions as `[width, height]` in pixels. ##### Returns \[`number`, `number`] ## Methods ### addGrid() > **addGrid**(`width`, `height`): `void` Defined in: [index.d.ts:492](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L492) Draws a cross-hair grid on the image. Grid squares have the specified `width` and `height`. #### Parameters ##### width `number` ##### height `number` #### Returns `void` *** ### base64() > **base64**(): `string` Defined in: [index.d.ts:520](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L520) Returns the image encoded as a base64 data URL. The result includes the MIME prefix, for example `data:image/png;base64,...` or `data:image/jpeg;base64,...`. #### Returns `string` *** ### compress() > **compress**(`quality`): `void` Defined in: [index.d.ts:499](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L499) Compress the image by converting it to JPEG with the specified quality. The quality is a value between 1 and 100. 1 is the lowest possible quality and 100 is the highest quality. #### Parameters ##### quality `number` #### Returns `void` *** ### ground() > **ground**(`model`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:535](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L535) Locate `concept` on this image using the given grounding model and return absolute zero-based pixel coordinates `[x, y]`. Equivalent to `model.ground(image, concept)` #### Parameters ##### model [`GroundingModel`](GroundingModel.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### save() > **save**(`path`): `void` Defined in: [index.d.ts:486](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L486) Path includes the file name and the extension. #### Parameters ##### path `string` #### Returns `void` *** ### shrink() > **shrink**(`nwidth`, `nheight`): `void` Defined in: [index.d.ts:511](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L511) Resizes this image if it is larger than the desired size. The image's aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight. This method operates on pixel channel values directly without taking into account color space data. We commonly use this to resize the image to 1920x1080. #### Parameters ##### nwidth `number` ##### nheight `number` #### Returns `void` *** ### fromBase64() > `static` **fromBase64**(`base64`): `Image` Defined in: [index.d.ts:528](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L528) Decodes a base64 image string into an image. Accepts either a raw base64 payload or a data URL such as `data:image/png;base64,...`, `data:image/jpeg;base64,...`, or `data:image/jpg;base64,...`. #### Parameters ##### base64 `string` #### Returns `Image` # Instance Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Instance # Class: Instance Defined in: [index.d.ts:539](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L539) Represents an opened application instance. ## Constructors ### Constructor > **new Instance**(): `Instance` #### Returns `Instance` ## Accessors ### pid #### Get Signature > **get** **pid**(): `number` Defined in: [index.d.ts:541](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L541) Get the process ID of the opened application (returns 0 when unknown). ##### Returns `number` ## Methods ### content() > **content**(): `string` Defined in: [index.d.ts:550](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L550) #### Returns `string` *** ### disableAccessibility() > **disableAccessibility**(): `void` Defined in: [index.d.ts:566](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L566) Disable the accessibility tree for the instance. Creating the accessibility tree is resource-intensive, so many applications disable it by default. After we are done controlling the instance, we should disable the accessibility tree to save resources. #### Returns `void` *** ### enableAccessibility() > **enableAccessibility**(): `void` Defined in: [index.d.ts:558](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L558) Enables the accessibility tree for the instance. This also works when the application is already running. #### Returns `void` *** ### focus() > **focus**(): `boolean` Defined in: [index.d.ts:549](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L549) Brings the instance to the foreground and gives it focus. #### Returns `boolean` *** ### hide() > **hide**(): `boolean` Defined in: [index.d.ts:543](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L543) Minimizes the instance. #### Returns `boolean` *** ### isAccessible() > **isAccessible**(): `boolean` Defined in: [index.d.ts:552](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L552) Returns true if the instance has an accessibility tree. #### Returns `boolean` *** ### isFocused() > **isFocused**(): `boolean` Defined in: [index.d.ts:547](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L547) Returns true if the instance has the focus. #### Returns `boolean` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): [`AccessibilityNode`](AccessibilityNode.mdx)\[] Defined in: [index.d.ts:591](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L591) Search this application's accessibility tree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Mirrors `simulang_rs::Instance::scored_search` with `BowJaccard` as the scorer and a permissive filter; returns every node whose score equals the maximum found and exceeds `threshold`. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node Returned nodes are full `AccessibilityNode` handles β€” call action methods (`activate`, `setValue`, …) directly on them, walk children with `.children()`, or render a snapshot with `.snapshot()`. #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns [`AccessibilityNode`](AccessibilityNode.mdx)\[] *** ### show() > **show**(): `boolean` Defined in: [index.d.ts:545](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L545) Shows the instance. #### Returns `boolean` # KeyboardController Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/KeyboardController # Class: KeyboardController Defined in: [index.d.ts:604](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L604) Contains functions to simulate key presses/releases and to input text. For entering text, the `text` method is best. If you want to enter a key without having to worry about the layout or the keymap, use the `key` method. If you want a specific (physical) key to be pressed (e.g WASD for games), use the `raw` method. The resulting keysym will depend on the layout/keymap. ## Constructors ### Constructor > **new KeyboardController**(): `KeyboardController` Defined in: [index.d.ts:605](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L605) #### Returns `KeyboardController` ## Methods ### key() > **key**(`key`, `direction`): `void` Defined in: [index.d.ts:619](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L619) Sends an individual key event. It will enter the keysym (virtual key). Have a look at the `raw` method, if you want to enter a keycode. Some of the keys are specific to a platform. #### Parameters ##### key [`Key`](../enumerations/Key.mdx) ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### keyOther() > **keyOther**(`value`, `direction`): `void` Defined in: [index.d.ts:623](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L623) Sends a key event for a raw, platform-specific key value. #### Parameters ##### value `number` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### keyUnicode() > **keyUnicode**(`value`, `direction`): `void` Defined in: [index.d.ts:621](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L621) Sends an individual Unicode key event. Provide a single character. #### Parameters ##### value `string` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### raw() > **raw**(`keycode`, `direction`): `void` Defined in: [index.d.ts:635](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L635) Sends a raw keycode. The keycode may or may not be mapped on the current layout. You have to make sure of that yourself. This can be useful if you want to simulate a press regardless of the layout (WASD on video games). Have a look at the `key` method, if you just want to enter a specific key and don't want to worry about the layout/keymap. Windows only: If you want to enter the keycode (scancode) of an extended key, you need to set the high byte for the extended key too. You can for example do: `raw(0xE01D, Direction.Click)` to simulate `RControl`. #### Parameters ##### keycode `number` ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### text() > **text**(`text`): `void` Defined in: [index.d.ts:611](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L611) Enter the text. You can use unicode here like: ❀吅. This works regardless of the current keyboard layout. You cannot use this function for entering shortcuts or something similar. For shortcuts, use the `key` method instead. #### Parameters ##### text `string` #### Returns `void` # LoopbackSource Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/LoopbackSource # Class: LoopbackSource Defined in: [index.d.ts:647](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L647) A loopback capture source that records system audio output (what the user hears through their speakers or headphones). Loopback capture is inherently platform-specific: macOS uses `ScreenCaptureKit` (requires screen-recording permission), Windows uses WASAPI loopback mode, and Linux uses PulseAudio/PipeWire monitor sources. ## Constructors ### Constructor > **new LoopbackSource**(`channels`, `sampleRate`): `LoopbackSource` Defined in: [index.d.ts:658](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L658) Opens a loopback capture stream for the given format. `channels` is the number of interleaved channels (1 = mono, 2 = stereo). `sample_rate` is samples per second per channel (e.g. 44100, 48000). The stream does not begin producing samples until `start()` is called. #### Parameters ##### channels `number` ##### sampleRate `number` #### Returns `LoopbackSource` ## Accessors ### channels #### Get Signature > **get** **channels**(): `number` Defined in: [index.d.ts:670](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L670) Number of interleaved channels (1 = mono, 2 = stereo). ##### Returns `number` *** ### sampleRate #### Get Signature > **get** **sampleRate**(): `number` Defined in: [index.d.ts:672](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L672) Samples per second per channel (e.g. 44100, 48000). ##### Returns `number` ## Methods ### drain() > **drain**(): [`SamplesBuffer`](SamplesBuffer.mdx) Defined in: [index.d.ts:686](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L686) Drains all buffered samples and returns them as a `SamplesBuffer`. Typical usage: call `start()`, do work while audio accumulates in the background, call `stop()`, then call `drain()` to collect everything that was captured. #### Returns [`SamplesBuffer`](SamplesBuffer.mdx) *** ### record() > **record**(`durationMs`): [`SamplesBuffer`](SamplesBuffer.mdx) Defined in: [index.d.ts:678](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L678) Blocks for exactly `duration_ms` and returns the captured audio as a `SamplesBuffer`. Useful for streaming fixed-size chunks while the source is still running. #### Parameters ##### durationMs `number` #### Returns [`SamplesBuffer`](SamplesBuffer.mdx) *** ### start() > **start**(): `void` Defined in: [index.d.ts:663](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L663) Begin capturing system audio. Must be called before `record()` or `drain()`. #### Returns `void` *** ### stop() > **stop**(): `void` Defined in: [index.d.ts:668](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L668) Stop capturing. May be started again with `start()`. After stopping, call `drain()` to collect remaining buffered samples. #### Returns `void` # MouseController Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/MouseController # Class: MouseController Defined in: [index.d.ts:697](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L697) Contains functions to control the mouse and to get the location of the cursor. A cartesian coordinate system is used for specifying coordinates. The origin is located in the top-left corner of the current screen, with positive values extending along the axes down and to the right of the origin point and it is measured in pixels. The same coordinate system is used on all operating systems. ## Constructors ### Constructor > **new MouseController**(): `MouseController` Defined in: [index.d.ts:698](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L698) #### Returns `MouseController` ## Methods ### button() > **button**(`button`, `direction`): `void` Defined in: [index.d.ts:704](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L704) Sends an individual mouse button event. You can use this for example to simulate a click of the left mouse key. Some of the buttons are specific to a platform. #### Parameters ##### button [`Button`](../enumerations/Button.mdx) ##### direction [`Direction`](../enumerations/Direction.mdx) #### Returns `void` *** ### location() > **location**(): \[`number`, `number`] Defined in: [index.d.ts:729](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L729) Get the location of the mouse in pixels. #### Returns \[`number`, `number`] *** ### moveMouse() > **moveMouse**(`x`, `y`, `coordinate`): `void` Defined in: [index.d.ts:720](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L720) Move the mouse cursor to the specified x and y coordinates. You can specify absolute coordinates or relative from the current position. If you use absolute coordinates, the top left corner of your monitor screen is x=0 y=0. Move the cursor down the screen by increasing the y and to the right by increasing x coordinate. If you use relative coordinates, a positive x value moves the mouse cursor `x` pixels to the right. A negative value for `x` moves the mouse cursor to the left. A positive value of y moves the mouse cursor down, a negative one moves the mouse cursor up. #### Parameters ##### x `number` ##### y `number` ##### coordinate [`Coordinate`](../enumerations/Coordinate.mdx) #### Returns `void` *** ### scroll() > **scroll**(`deltaX`, `deltaY`): `void` Defined in: [index.d.ts:727](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L727) Send a mouse scroll event. A positive length will result in scrolling down/right and negative ones up/left. #### Parameters ##### deltaX `number` ##### deltaY `number` #### Returns `void` # Player Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Player # Class: Player Defined in: [index.d.ts:738](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L738) Handle to a device that outputs sounds. Dropping the `Player` (prevent this by holding a reference) stops all its sounds. ## Constructors ### Constructor > **new Player**(): `Player` #### Returns `Player` ## Accessors ### isPaused #### Get Signature > **get** **isPaused**(): `boolean` Defined in: [index.d.ts:791](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L791) Whether the player is currently paused. Players can be paused and resumed using `pause()` and `play()`. ##### Returns `boolean` *** ### speed #### Get Signature > **get** **speed**(): `number` Defined in: [index.d.ts:781](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L781) Playback speed of the sound. Increasing the speed will increase the pitch by the same factor. For example, speed `0.5` halves the frequency (lowering pitch) and speed `2` doubles it (raising pitch). Changes in speed affect the total duration inversely. ##### Returns `number` #### Set Signature > **set** **speed**(`value`): `void` Defined in: [index.d.ts:786](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L786) Changes the play speed of the sound. Does not adjust the samples, only the playback speed. ##### Parameters ###### value `number` ##### Returns `void` *** ### volume #### Get Signature > **get** **volume**(): `number` Defined in: [index.d.ts:765](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L765) Volume of the sound. The value `1.0` is the "normal" volume (unfiltered input). Any value other than `1.0` will multiply each sample by this value. ##### Returns `number` #### Set Signature > **set** **volume**(`value`): `void` Defined in: [index.d.ts:772](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L772) Sets the volume of the sound. The value `1.0` is the "normal" volume (unfiltered input). Any value other than `1.0` will multiply each sample by this value. ##### Parameters ###### value `number` ##### Returns `void` ## Methods ### appendFile() > **appendFile**(`path`): `void` Defined in: [index.d.ts:745](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L745) Decodes an audio file and appends it to the playback queue. Supports WAV, MP3, FLAC, Vorbis/OGG, and other formats depending on build features. #### Parameters ##### path `string` #### Returns `void` *** ### appendSamples() > **appendSamples**(`buffer`): `void` Defined in: [index.d.ts:747](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L747) Appends a sound to the queue of sounds to play. #### Parameters ##### buffer [`SamplesBuffer`](SamplesBuffer.mdx) #### Returns `void` *** ### clear() > **clear**(): `void` Defined in: [index.d.ts:813](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L813) Removes all currently loaded sources from the player and pauses it. #### Returns `void` *** ### empty() > **empty**(): `boolean` Defined in: [index.d.ts:793](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L793) Returns `true` if this player has no more sounds to play. #### Returns `boolean` *** ### getPos() > **getPos**(): `number` Defined in: [index.d.ts:808](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L808) Returns the position of the sound that's being played, in milliseconds. This takes into account any speedup or delay applied. Example: if you apply a speedup of *2* to a source and `getPos()` returns *5000* then the position in the recording is *10 seconds* from its start. #### Returns `number` *** ### len() > **len**(): `number` Defined in: [index.d.ts:795](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L795) Returns the number of sounds currently in the queue. #### Returns `number` *** ### pause() > **pause**(): `void` Defined in: [index.d.ts:756](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L756) Pauses playback of this player. No effect if already paused. A paused player can be resumed with `play()`. #### Returns `void` *** ### play() > **play**(): `void` Defined in: [index.d.ts:749](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L749) Resumes playback of a paused player. No effect if not paused. #### Returns `void` *** ### skipOne() > **skipOne**(): `void` Defined in: [index.d.ts:821](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L821) Skips to the next source in the player. If there are more sources appended to the player at the time, it will play the next one. Otherwise, the player will finish as if it had finished playing a source all the way through. #### Returns `void` *** ### sleepUntilEnd() > **sleepUntilEnd**(): `void` Defined in: [index.d.ts:797](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L797) Sleeps the current thread until the sound ends. #### Returns `void` *** ### stop() > **stop**(): `void` Defined in: [index.d.ts:758](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L758) Stops the player by emptying the queue. #### Returns `void` *** ### trySeek() > **trySeek**(`posMs`): `void` Defined in: [index.d.ts:833](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L833) Attempts to seek to the given position (in milliseconds) in the current source. This blocks between 0 and \~5 milliseconds. As long as the duration of the source is known, seek is guaranteed to saturate at the end of the source. For example given a source that reports a total duration of 42 seconds, calling `trySeek(60000)` will seek to 42 seconds. #### Parameters ##### posMs `number` #### Returns `void` # SamplesBuffer Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/SamplesBuffer # Class: SamplesBuffer Defined in: [index.d.ts:837](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L837) A buffer of samples treated as a source. ## Constructors ### Constructor > **new SamplesBuffer**(`channels`, `sampleRate`, `samples`): `SamplesBuffer` Defined in: [index.d.ts:846](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L846) Creates a new buffer from raw PCM samples. `channels` is the number of interleaved channels (1 = mono, 2 = stereo). `sample_rate` is samples per second per channel (e.g. 16000, 44100). `samples` is an array of f32 audio samples in `[-1.0, 1.0]`. #### Parameters ##### channels `number` ##### sampleRate `number` ##### samples `number`\[] #### Returns `SamplesBuffer` ## Accessors ### channels #### Get Signature > **get** **channels**(): `number` Defined in: [index.d.ts:848](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L848) Number of interleaved channels (1 = mono, 2 = stereo). ##### Returns `number` *** ### durationMs #### Get Signature > **get** **durationMs**(): `number` Defined in: [index.d.ts:852](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L852) Total duration of the buffer in milliseconds. ##### Returns `number` *** ### sampleRate #### Get Signature > **get** **sampleRate**(): `number` Defined in: [index.d.ts:850](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L850) Samples per second per channel (e.g. 16000, 44100). ##### Returns `number` ## Methods ### transcribe() > **transcribe**(`model`): `string` Defined in: [index.d.ts:859](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L859) Transcribe this audio buffer with the given speech-to-text model and return the recognized text. Equivalent to `model.transcribe(buffer)` #### Parameters ##### model [`SttModel`](SttModel.mdx) #### Returns `string` # Screen Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Screen # Class: Screen Defined in: [index.d.ts:863](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L863) Represents a physical display/screen. ## Constructors ### Constructor > **new Screen**(): `Screen` #### Returns `Screen` ## Methods ### dimensions() > **dimensions**(): \[`number`, `number`, `number`, `number`] Defined in: [index.d.ts:877](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L877) Returns the dimensions of the screen in pixels. The return value is `[x, y, width, height]`. #### Returns \[`number`, `number`, `number`, `number`] *** ### fromCurrentMouseLocation() > `static` **fromCurrentMouseLocation**(): `Screen` Defined in: [index.d.ts:871](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L871) Returns the screen identifier for the screen on which the mouse is located. If the mouse is not on any screen, the main screen is returned. #### Returns `Screen` *** ### mainScreen() > `static` **mainScreen**(): `Screen` Defined in: [index.d.ts:865](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L865) Returns the screen identifier for the main screen. #### Returns `Screen` # Screenshot Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Screenshot # Class: Screenshot Defined in: [index.d.ts:881](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L881) Represents a screenshot capture. ## Constructors ### Constructor > **new Screenshot**(): `Screenshot` #### Returns `Screenshot` ## Accessors ### dimensions #### Get Signature > **get** **dimensions**(): \[`number`, `number`] Defined in: [index.d.ts:910](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L910) Returns the screenshot dimensions as `[width, height]` in pixels. ##### Returns \[`number`, `number`] ## Methods ### addGrid() > **addGrid**(`width`, `height`): `void` Defined in: [index.d.ts:889](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L889) Draws a cross-hair grid on the image. Grid squares have the specified `width` and `height`. #### Parameters ##### width `number` ##### height `number` #### Returns `void` *** ### base64() > **base64**(): `string` Defined in: [index.d.ts:917](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L917) Returns the image encoded as a base64 data URL. The result includes the MIME prefix, for example `data:image/png;base64,...` or `data:image/jpeg;base64,...`. #### Returns `string` *** ### compress() > **compress**(`quality`): `void` Defined in: [index.d.ts:896](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L896) Compress the image by converting it to JPEG with the specified quality. The quality is a value between 1 and 100. 1 is the lowest possible quality and 100 is the highest quality. #### Parameters ##### quality `number` #### Returns `void` *** ### ground() > **ground**(`model`, `concept`): \[`number`, `number`] Defined in: [index.d.ts:939](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L939) Locate `concept` on this screenshot using the given grounding model and return the corresponding **global physical pixel coordinates** `[x, y]`. The output can be fed directly to primitives that expect global screen coordinates. Equivalent to `model.ground(screenshot, concept)`. #### Parameters ##### model [`GroundingModel`](GroundingModel.mdx) ##### concept `string` #### Returns \[`number`, `number`] *** ### save() > **save**(`path`): `void` Defined in: [index.d.ts:883](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L883) Path includes the file name and the extension. #### Parameters ##### path `string` #### Returns `void` *** ### shrink() > **shrink**(`nwidth`, `nheight`): `void` Defined in: [index.d.ts:908](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L908) Resizes this image if it is larger than the desired size. The image's aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight. This method operates on pixel channel values directly without taking into account color space data. We commonly use this to resize the image to 1920x1080. #### Parameters ##### nwidth `number` ##### nheight `number` #### Returns `void` *** ### toGlobalPhysicalPixels() > **toGlobalPhysicalPixels**(`x`, `y`, `coordType`): \[`number`, `number`] Defined in: [index.d.ts:930](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L930) Converts a point in this screenshot to global physical pixel coordinates. Screenshots may represent only part of a display, and displays may use different scale factors. Use this to map `(x, y)` to the corresponding global physical pixel position (for example, when moving the mouse to the same on-screen point). See `ScreenshotCoordinateType` for how `coord_type` affects interpretation of `(x, y)`. #### Parameters ##### x `number` ##### y `number` ##### coordType [`ScreenshotCoordinateType`](ScreenshotCoordinateType.mdx) #### Returns \[`number`, `number`] # ScreenshotCoordinateType Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/ScreenshotCoordinateType # Class: ScreenshotCoordinateType Defined in: [index.d.ts:946](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L946) Describes how `(x, y)` coordinates passed to `Screenshot.toGlobalPhysicalPixels` should be interpreted. ## Constructors ### Constructor > **new ScreenshotCoordinateType**(): `ScreenshotCoordinateType` #### Returns `ScreenshotCoordinateType` ## Methods ### absolute() > `static` **absolute**(): `ScreenshotCoordinateType` Defined in: [index.d.ts:951](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L951) Coordinates are in screenshot image pixels (valid range: `0..=image_width-1`). #### Returns `ScreenshotCoordinateType` *** ### normalized() > `static` **normalized**(`range`): `ScreenshotCoordinateType` Defined in: [index.d.ts:958](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L958) Coordinates are normalized to a fixed range. Many VLMs (Qwen-VL, UI-TARS, etc.) output grounding coordinates in `[0, range]` rather than in pixel space. `range` specifies the inclusive upper bound (e.g. 1000, meaning valid coordinates are `0..=1000`). #### Parameters ##### range `number` #### Returns `ScreenshotCoordinateType` # SttModel Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/SttModel # Class: SttModel Defined in: [index.d.ts:962](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L962) A speech-to-text model that can transcribe audio. ## Constructors ### Constructor > **new SttModel**(): `SttModel` #### Returns `SttModel` ## Accessors ### name #### Get Signature > **get** **name**(): `string` Defined in: [index.d.ts:992](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L992) The wire-level model identifier sent in the request body. ##### Returns `string` ## Methods ### transcribe() > **transcribe**(`audio`): `string` Defined in: [index.d.ts:994](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L994) Transcribe a single audio chunk and return the recognised text. #### Parameters ##### audio [`SamplesBuffer`](SamplesBuffer.mdx) #### Returns `string` *** ### availableAliases() > `static` **availableAliases**(): `string`\[] Defined in: [index.d.ts:990](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L990) Every STT model alias accepted by `byAlias` on this machine, deduplicated and sorted alphabetically. Use to discover what aliases the loaded config (bundled defaults plus any user provider files) advertises. #### Returns `string`\[] *** ### byAlias() > `static` **byAlias**(`alias`): `SttModel` Defined in: [index.d.ts:974](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L974) Resolve a model alias against the loaded config (e.g. `"whisper_large_v3_turbo"`, `"whisper_large_v3"`, or any alias declared by a user provider). Throws if the alias is unknown. #### Parameters ##### alias `string` #### Returns `SttModel` *** ### default() > `static` **default**(): `SttModel` Defined in: [index.d.ts:968](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L968) First STT model advertised by the first STT provider in the loaded config. Throws if no provider in the loaded config advertises an STT service. #### Returns `SttModel` *** ### whisperLargeV3() > `static` **whisperLargeV3**(): `SttModel` Defined in: [index.d.ts:984](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L984) Whisper Large V3 β€” highest accuracy. Convenience shim for the bundled `whisper_large_v3` alias. #### Returns `SttModel` *** ### whisperLargeV3Turbo() > `static` **whisperLargeV3Turbo**(): `SttModel` Defined in: [index.d.ts:979](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L979) Whisper Large V3 Turbo β€” fast, slightly less accurate. Convenience shim for the bundled `whisper_large_v3_turbo` alias. #### Returns `SttModel` # System Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/System # Class: System Defined in: [index.d.ts:998](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L998) Provides system-wide operations. ## Constructors ### Constructor > **new System**(): `System` #### Returns `System` ## Methods ### fuzzySearch() > `static` **fuzzySearch**(`query`): [`App`](App.mdx) Defined in: [index.d.ts:1005](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1005) Tries to find an installed app by fuzzy matching against the available app list. #### Parameters ##### query `string` #### Returns [`App`](App.mdx) *** ### listApps() > `static` **listApps**(): [`App`](App.mdx)\[] Defined in: [index.d.ts:1000](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1000) Returns all available applications. #### Returns [`App`](App.mdx)\[] # Window Source: https://docs.simular.ai/simulang-js/api/v6.0.1/classes/Window # Class: Window Defined in: [index.d.ts:1013](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1013) Handle to an on-screen window. Constructed via \[`Window.all`] or \[`Window.allForPid`] and exposes read-only metadata (`title`, `pid`) alongside basic actions (`minimize`, `maximize`, `close`). ## Constructors ### Constructor > **new Window**(): `Window` #### Returns `Window` ## Accessors ### pid #### Get Signature > **get** **pid**(): `number` Defined in: [index.d.ts:1021](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1021) Process ID that owns this window. ##### Returns `number` *** ### title #### Get Signature > **get** **title**(): `string` Defined in: [index.d.ts:1019](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1019) Window title (may be empty). ##### Returns `string` ## Methods ### close() > **close**(): `void` Defined in: [index.d.ts:1030](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1030) Close the window (user-equivalent to clicking the close button / pressing Alt+F4 / Cmd+W). #### Returns `void` *** ### maximize() > **maximize**(): `void` Defined in: [index.d.ts:1025](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1025) Maximize / zoom the window. #### Returns `void` *** ### minimize() > **minimize**(): `void` Defined in: [index.d.ts:1023](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1023) Minimize the window (hide to taskbar / Dock). #### Returns `void` *** ### scoredSearch() > **scoredSearch**(`order`, `maxNodes`, `collapseStructural`, `query`, `threshold`): [`AccessibilityNode`](AccessibilityNode.mdx)\[] Defined in: [index.d.ts:1068](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1068) Search this window's accessibility subtree by *concept text*, using bag-of-words paired-Jaccard scoring against each node's `overallDescription` (`simulang_rs::AXNodeSynthetic::summary_with_context`). Mirrors `simulang_rs::Window::scored_search` (macOS / Linux) β€” on Windows we use the same underlying primitive via `WindowTrait::node().scored_search(...)`, which prebuilds the cached UIA subtree so the walk costs a single IPC. Returns every node whose score equals the maximum found and exceeds `threshold`. * `order` – `TraversalOrder.DepthFirst` or `TraversalOrder.BreadthFirst` * `max_nodes` – upper bound on nodes visited (uses `.take()` over the walk) * `collapse_structural` – hoist empty structural wrappers out of the walk before scoring * `query` – natural-language concept Jaccard-compared against each node's `overallDescription` * `threshold` – minimum score to keep a node Returned nodes are full `AccessibilityNode` handles β€” call action methods (`activate`, `setValue`, …) directly on them, walk children with `.children()`, or render a snapshot with `.snapshot()`. #### Parameters ##### order [`TraversalOrder`](../enumerations/TraversalOrder.mdx) ##### maxNodes `number` ##### collapseStructural `boolean` ##### query `string` ##### threshold `number` #### Returns [`AccessibilityNode`](AccessibilityNode.mdx)\[] *** ### snapshot() > **snapshot**(): `string` Defined in: [index.d.ts:1041](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1041) Render the window's accessibility subtree as an indented Playwright-style aria snapshot. One line per node, two spaces of indentation per depth level, in pre-order DFS. Roles are emitted raw (`AXWindow` on macOS, `UIA.ControlType.*` on Windows), with title and value appended when non-empty. No refs are assigned β€” for ref-based interaction use \[`AccessibilityTree.snapshot`] instead. #### Returns `string` *** ### all() > `static` **all**(): `Window`\[] Defined in: [index.d.ts:1017](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1017) All visible top-level windows across every process. #### Returns `Window`\[] *** ### allForPid() > `static` **allForPid**(`pid`): `Window`\[] Defined in: [index.d.ts:1015](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1015) All visible top-level windows for a given process. #### Parameters ##### pid `number` #### Returns `Window`\[] # AriaRole Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/AriaRole # Enumeration: AriaRole Defined in: [index.d.ts:1093](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1093) Cross-platform ARIA / Playwright role. Used as the `role` field on accessibility snapshots and as the search key in \[`AccessibilityTree::find`]. ## Enumeration Members ### Alert > **Alert**: `0` Defined in: [index.d.ts:1094](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1094) *** ### AlertDialog > **AlertDialog**: `1` Defined in: [index.d.ts:1095](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1095) *** ### Application > **Application**: `2` Defined in: [index.d.ts:1096](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1096) *** ### Article > **Article**: `3` Defined in: [index.d.ts:1097](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1097) *** ### Audio > **Audio**: `4` Defined in: [index.d.ts:1098](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1098) *** ### Banner > **Banner**: `5` Defined in: [index.d.ts:1099](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1099) *** ### Blockquote > **Blockquote**: `6` Defined in: [index.d.ts:1100](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1100) *** ### Button > **Button**: `7` Defined in: [index.d.ts:1101](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1101) *** ### Caption > **Caption**: `8` Defined in: [index.d.ts:1102](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1102) *** ### Cell > **Cell**: `9` Defined in: [index.d.ts:1103](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1103) *** ### Checkbox > **Checkbox**: `10` Defined in: [index.d.ts:1104](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1104) *** ### Code > **Code**: `11` Defined in: [index.d.ts:1105](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1105) *** ### ColumnHeader > **ColumnHeader**: `12` Defined in: [index.d.ts:1106](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1106) *** ### Combobox > **Combobox**: `13` Defined in: [index.d.ts:1107](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1107) *** ### Complementary > **Complementary**: `14` Defined in: [index.d.ts:1108](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1108) *** ### ContentInfo > **ContentInfo**: `15` Defined in: [index.d.ts:1109](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1109) *** ### Definition > **Definition**: `16` Defined in: [index.d.ts:1110](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1110) *** ### Deletion > **Deletion**: `17` Defined in: [index.d.ts:1111](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1111) *** ### Dialog > **Dialog**: `18` Defined in: [index.d.ts:1112](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1112) *** ### Directory > **Directory**: `19` Defined in: [index.d.ts:1113](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1113) *** ### Document > **Document**: `20` Defined in: [index.d.ts:1114](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1114) *** ### Emphasis > **Emphasis**: `21` Defined in: [index.d.ts:1115](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1115) *** ### Feed > **Feed**: `22` Defined in: [index.d.ts:1116](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1116) *** ### Figure > **Figure**: `23` Defined in: [index.d.ts:1117](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1117) *** ### Form > **Form**: `24` Defined in: [index.d.ts:1118](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1118) *** ### Generic > **Generic**: `25` Defined in: [index.d.ts:1119](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1119) *** ### Grid > **Grid**: `26` Defined in: [index.d.ts:1120](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1120) *** ### GridCell > **GridCell**: `27` Defined in: [index.d.ts:1121](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1121) *** ### Group > **Group**: `28` Defined in: [index.d.ts:1122](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1122) *** ### Heading > **Heading**: `29` Defined in: [index.d.ts:1123](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1123) *** ### Img > **Img**: `30` Defined in: [index.d.ts:1124](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1124) *** ### Insertion > **Insertion**: `31` Defined in: [index.d.ts:1125](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1125) *** ### Link > **Link**: `32` Defined in: [index.d.ts:1126](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1126) *** ### List > **List**: `33` Defined in: [index.d.ts:1127](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1127) *** ### Listbox > **Listbox**: `35` Defined in: [index.d.ts:1129](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1129) *** ### ListItem > **ListItem**: `34` Defined in: [index.d.ts:1128](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1128) *** ### Log > **Log**: `36` Defined in: [index.d.ts:1130](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1130) *** ### Main > **Main**: `37` Defined in: [index.d.ts:1131](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1131) *** ### Mark > **Mark**: `38` Defined in: [index.d.ts:1132](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1132) *** ### Marquee > **Marquee**: `39` Defined in: [index.d.ts:1133](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1133) *** ### Math > **Math**: `40` Defined in: [index.d.ts:1134](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1134) *** ### Menu > **Menu**: `41` Defined in: [index.d.ts:1135](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1135) *** ### MenuBar > **MenuBar**: `42` Defined in: [index.d.ts:1136](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1136) *** ### MenuItem > **MenuItem**: `43` Defined in: [index.d.ts:1137](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1137) *** ### MenuItemCheckbox > **MenuItemCheckbox**: `44` Defined in: [index.d.ts:1138](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1138) *** ### MenuItemRadio > **MenuItemRadio**: `45` Defined in: [index.d.ts:1139](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1139) *** ### Meter > **Meter**: `46` Defined in: [index.d.ts:1140](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1140) *** ### Navigation > **Navigation**: `47` Defined in: [index.d.ts:1141](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1141) *** ### Note > **Note**: `48` Defined in: [index.d.ts:1142](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1142) *** ### Option > **Option**: `49` Defined in: [index.d.ts:1143](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1143) *** ### Paragraph > **Paragraph**: `50` Defined in: [index.d.ts:1144](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1144) *** ### Password > **Password**: `51` Defined in: [index.d.ts:1145](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1145) *** ### Presentation > **Presentation**: `52` Defined in: [index.d.ts:1146](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1146) *** ### ProgressBar > **ProgressBar**: `53` Defined in: [index.d.ts:1147](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1147) *** ### Radio > **Radio**: `54` Defined in: [index.d.ts:1148](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1148) *** ### RadioGroup > **RadioGroup**: `55` Defined in: [index.d.ts:1149](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1149) *** ### Region > **Region**: `56` Defined in: [index.d.ts:1150](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1150) *** ### Row > **Row**: `57` Defined in: [index.d.ts:1151](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1151) *** ### RowGroup > **RowGroup**: `58` Defined in: [index.d.ts:1152](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1152) *** ### RowHeader > **RowHeader**: `59` Defined in: [index.d.ts:1153](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1153) *** ### Scrollbar > **Scrollbar**: `60` Defined in: [index.d.ts:1154](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1154) *** ### Search > **Search**: `61` Defined in: [index.d.ts:1155](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1155) *** ### Searchbox > **Searchbox**: `62` Defined in: [index.d.ts:1156](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1156) *** ### Separator > **Separator**: `63` Defined in: [index.d.ts:1157](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1157) *** ### Slider > **Slider**: `64` Defined in: [index.d.ts:1158](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1158) *** ### SpinButton > **SpinButton**: `65` Defined in: [index.d.ts:1159](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1159) *** ### Status > **Status**: `66` Defined in: [index.d.ts:1160](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1160) *** ### Strong > **Strong**: `67` Defined in: [index.d.ts:1161](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1161) *** ### Subscript > **Subscript**: `68` Defined in: [index.d.ts:1162](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1162) *** ### Suggestion > **Suggestion**: `69` Defined in: [index.d.ts:1163](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1163) *** ### Superscript > **Superscript**: `70` Defined in: [index.d.ts:1164](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1164) *** ### Switch > **Switch**: `71` Defined in: [index.d.ts:1165](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1165) *** ### Tab > **Tab**: `72` Defined in: [index.d.ts:1166](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1166) *** ### Table > **Table**: `73` Defined in: [index.d.ts:1167](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1167) *** ### TabList > **TabList**: `74` Defined in: [index.d.ts:1168](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1168) *** ### TabPanel > **TabPanel**: `75` Defined in: [index.d.ts:1169](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1169) *** ### Term > **Term**: `76` Defined in: [index.d.ts:1170](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1170) *** ### Text > **Text**: `77` Defined in: [index.d.ts:1171](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1171) *** ### Textbox > **Textbox**: `78` Defined in: [index.d.ts:1172](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1172) *** ### Time > **Time**: `79` Defined in: [index.d.ts:1173](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1173) *** ### Timer > **Timer**: `80` Defined in: [index.d.ts:1174](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1174) *** ### Toolbar > **Toolbar**: `81` Defined in: [index.d.ts:1175](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1175) *** ### Tooltip > **Tooltip**: `82` Defined in: [index.d.ts:1176](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1176) *** ### Tree > **Tree**: `83` Defined in: [index.d.ts:1177](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1177) *** ### Treegrid > **Treegrid**: `85` Defined in: [index.d.ts:1179](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1179) *** ### TreeItem > **TreeItem**: `84` Defined in: [index.d.ts:1178](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1178) *** ### Video > **Video**: `86` Defined in: [index.d.ts:1180](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1180) *** ### Window > **Window**: `87` Defined in: [index.d.ts:1181](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1181) # Button Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/Button # Enumeration: Button Defined in: [index.d.ts:1206](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1206) Represents a mouse button. ## Enumeration Members ### Back > **Back**: `3` Defined in: [index.d.ts:1210](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1210) *** ### Forward > **Forward**: `4` Defined in: [index.d.ts:1211](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1211) *** ### Left > **Left**: `0` Defined in: [index.d.ts:1207](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1207) *** ### Middle > **Middle**: `1` Defined in: [index.d.ts:1208](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1208) *** ### Right > **Right**: `2` Defined in: [index.d.ts:1209](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1209) *** ### ScrollDown > **ScrollDown**: `6` Defined in: [index.d.ts:1213](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1213) *** ### ScrollLeft > **ScrollLeft**: `7` Defined in: [index.d.ts:1214](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1214) *** ### ScrollRight > **ScrollRight**: `8` Defined in: [index.d.ts:1215](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1215) *** ### ScrollUp > **ScrollUp**: `5` Defined in: [index.d.ts:1212](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1212) # Coordinate Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/Coordinate # Enumeration: Coordinate Defined in: [index.d.ts:1219](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1219) Specifies if coordinates are relative or absolute. ## Enumeration Members ### Abs > **Abs**: `0` Defined in: [index.d.ts:1220](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1220) *** ### Rel > **Rel**: `1` Defined in: [index.d.ts:1221](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1221) # Direction Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/Direction # Enumeration: Direction Defined in: [index.d.ts:1225](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1225) The direction of a button event. ## Enumeration Members ### Click > **Click**: `2` Defined in: [index.d.ts:1228](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1228) *** ### Press > **Press**: `0` Defined in: [index.d.ts:1226](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1226) *** ### Release > **Release**: `1` Defined in: [index.d.ts:1227](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1227) # FocusPolicy Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/FocusPolicy # Enumeration: FocusPolicy Defined in: [index.d.ts:1235](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1235) Focus behavior when opening an application. ## Enumeration Members ### DoNotSteal > **DoNotSteal**: `0` Defined in: [index.d.ts:1240](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1240) Request launch without forcing activation/frontmost focus; some applications may still steal focus. *** ### Steal > **Steal**: `1` Defined in: [index.d.ts:1242](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1242) Allow the launched app to become active/frontmost. # Key Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/Key # Enumeration: Key Defined in: [index.d.ts:1309](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1309) Represents a keyboard key. ## Enumeration Members ### A > **A**: `10` Defined in: [index.d.ts:1320](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1320) *** ### AbntC1 > **AbntC1**: `36` Defined in: [index.d.ts:1346](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1346) *** ### AbntC2 > **AbntC2**: `37` Defined in: [index.d.ts:1347](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1347) *** ### Accept > **Accept**: `38` Defined in: [index.d.ts:1348](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1348) *** ### Add > **Add**: `39` Defined in: [index.d.ts:1349](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1349) *** ### Alt > **Alt**: `40` Defined in: [index.d.ts:1351](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1351) alt key on Linux and Windows (option key on macOS) *** ### Apps > **Apps**: `41` Defined in: [index.d.ts:1352](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1352) *** ### Attn > **Attn**: `42` Defined in: [index.d.ts:1353](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1353) *** ### B > **B**: `11` Defined in: [index.d.ts:1321](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1321) *** ### Backspace > **Backspace**: `43` Defined in: [index.d.ts:1355](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1355) backspace key *** ### Begin > **Begin**: `45` Defined in: [index.d.ts:1357](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1357) *** ### Break > **Break**: `44` Defined in: [index.d.ts:1356](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1356) *** ### BrightnessDown > **BrightnessDown**: `46` Defined in: [index.d.ts:1358](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1358) *** ### BrightnessUp > **BrightnessUp**: `47` Defined in: [index.d.ts:1359](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1359) *** ### BrowserBack > **BrowserBack**: `48` Defined in: [index.d.ts:1360](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1360) *** ### BrowserFavorites > **BrowserFavorites**: `49` Defined in: [index.d.ts:1361](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1361) *** ### BrowserForward > **BrowserForward**: `50` Defined in: [index.d.ts:1362](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1362) *** ### BrowserHome > **BrowserHome**: `51` Defined in: [index.d.ts:1363](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1363) *** ### BrowserRefresh > **BrowserRefresh**: `52` Defined in: [index.d.ts:1364](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1364) *** ### BrowserSearch > **BrowserSearch**: `53` Defined in: [index.d.ts:1365](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1365) *** ### BrowserStop > **BrowserStop**: `54` Defined in: [index.d.ts:1366](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1366) *** ### C > **C**: `12` Defined in: [index.d.ts:1322](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1322) *** ### Cancel > **Cancel**: `55` Defined in: [index.d.ts:1367](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1367) *** ### CapsLock > **CapsLock**: `56` Defined in: [index.d.ts:1369](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1369) caps lock key *** ### Clear > **Clear**: `57` Defined in: [index.d.ts:1370](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1370) *** ### ContrastDown > **ContrastDown**: `59` Defined in: [index.d.ts:1372](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1372) *** ### ContrastUp > **ContrastUp**: `58` Defined in: [index.d.ts:1371](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1371) *** ### Control > **Control**: `60` Defined in: [index.d.ts:1374](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1374) control key *** ### Convert > **Convert**: `61` Defined in: [index.d.ts:1375](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1375) *** ### Crsel > **Crsel**: `62` Defined in: [index.d.ts:1376](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1376) *** ### D > **D**: `13` Defined in: [index.d.ts:1323](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1323) *** ### DBEAlphanumeric > **DBEAlphanumeric**: `63` Defined in: [index.d.ts:1377](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1377) *** ### DBECodeinput > **DBECodeinput**: `64` Defined in: [index.d.ts:1378](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1378) *** ### DBEDetermineString > **DBEDetermineString**: `65` Defined in: [index.d.ts:1379](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1379) *** ### DBEEnterDLGConversionMode > **DBEEnterDLGConversionMode**: `66` Defined in: [index.d.ts:1380](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1380) *** ### DBEEnterIMEConfigMode > **DBEEnterIMEConfigMode**: `67` Defined in: [index.d.ts:1381](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1381) *** ### DBEEnterWordRegisterMode > **DBEEnterWordRegisterMode**: `68` Defined in: [index.d.ts:1382](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1382) *** ### DBEFlushString > **DBEFlushString**: `69` Defined in: [index.d.ts:1383](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1383) *** ### DBEHiragana > **DBEHiragana**: `70` Defined in: [index.d.ts:1384](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1384) *** ### DBEKatakana > **DBEKatakana**: `71` Defined in: [index.d.ts:1385](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1385) *** ### DBENoCodepoint > **DBENoCodepoint**: `72` Defined in: [index.d.ts:1386](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1386) *** ### DBENoRoman > **DBENoRoman**: `73` Defined in: [index.d.ts:1387](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1387) *** ### DBERoman > **DBERoman**: `74` Defined in: [index.d.ts:1388](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1388) *** ### DBESBCSChar > **DBESBCSChar**: `75` Defined in: [index.d.ts:1389](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1389) *** ### DBESChar > **DBESChar**: `76` Defined in: [index.d.ts:1390](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1390) *** ### Decimal > **Decimal**: `77` Defined in: [index.d.ts:1391](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1391) *** ### Delete > **Delete**: `78` Defined in: [index.d.ts:1393](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1393) delete key *** ### Divide > **Divide**: `79` Defined in: [index.d.ts:1394](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1394) *** ### DownArrow > **DownArrow**: `80` Defined in: [index.d.ts:1396](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1396) down arrow key *** ### E > **E**: `14` Defined in: [index.d.ts:1324](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1324) *** ### Eject > **Eject**: `81` Defined in: [index.d.ts:1397](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1397) *** ### End > **End**: `82` Defined in: [index.d.ts:1399](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1399) end key *** ### Ereof > **Ereof**: `83` Defined in: [index.d.ts:1400](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1400) *** ### Escape > **Escape**: `84` Defined in: [index.d.ts:1402](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1402) escape key (esc) *** ### Execute > **Execute**: `85` Defined in: [index.d.ts:1403](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1403) *** ### Exsel > **Exsel**: `86` Defined in: [index.d.ts:1404](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1404) *** ### F > **F**: `15` Defined in: [index.d.ts:1325](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1325) *** ### F1 > **F1**: `87` Defined in: [index.d.ts:1406](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1406) F1 key *** ### F10 > **F10**: `96` Defined in: [index.d.ts:1424](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1424) F10 key *** ### F11 > **F11**: `97` Defined in: [index.d.ts:1426](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1426) F11 key *** ### F12 > **F12**: `98` Defined in: [index.d.ts:1428](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1428) F12 key *** ### F13 > **F13**: `99` Defined in: [index.d.ts:1430](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1430) F13 key *** ### F14 > **F14**: `100` Defined in: [index.d.ts:1432](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1432) F14 key *** ### F15 > **F15**: `101` Defined in: [index.d.ts:1434](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1434) F15 key *** ### F16 > **F16**: `102` Defined in: [index.d.ts:1436](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1436) F16 key *** ### F17 > **F17**: `103` Defined in: [index.d.ts:1438](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1438) F17 key *** ### F18 > **F18**: `104` Defined in: [index.d.ts:1440](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1440) F18 key *** ### F19 > **F19**: `105` Defined in: [index.d.ts:1442](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1442) F19 key *** ### F2 > **F2**: `88` Defined in: [index.d.ts:1408](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1408) F2 key *** ### F20 > **F20**: `106` Defined in: [index.d.ts:1444](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1444) F20 key *** ### F21 > **F21**: `107` Defined in: [index.d.ts:1446](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1446) F21 key *** ### F22 > **F22**: `108` Defined in: [index.d.ts:1448](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1448) F22 key *** ### F23 > **F23**: `109` Defined in: [index.d.ts:1450](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1450) F23 key *** ### F24 > **F24**: `110` Defined in: [index.d.ts:1452](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1452) F24 key *** ### F25 > **F25**: `111` Defined in: [index.d.ts:1453](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1453) *** ### F26 > **F26**: `112` Defined in: [index.d.ts:1454](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1454) *** ### F27 > **F27**: `113` Defined in: [index.d.ts:1455](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1455) *** ### F28 > **F28**: `114` Defined in: [index.d.ts:1456](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1456) *** ### F29 > **F29**: `115` Defined in: [index.d.ts:1457](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1457) *** ### F3 > **F3**: `89` Defined in: [index.d.ts:1410](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1410) F3 key *** ### F30 > **F30**: `116` Defined in: [index.d.ts:1458](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1458) *** ### F31 > **F31**: `117` Defined in: [index.d.ts:1459](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1459) *** ### F32 > **F32**: `118` Defined in: [index.d.ts:1460](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1460) *** ### F33 > **F33**: `119` Defined in: [index.d.ts:1461](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1461) *** ### F34 > **F34**: `120` Defined in: [index.d.ts:1462](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1462) *** ### F35 > **F35**: `121` Defined in: [index.d.ts:1463](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1463) *** ### F4 > **F4**: `90` Defined in: [index.d.ts:1412](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1412) F4 key *** ### F5 > **F5**: `91` Defined in: [index.d.ts:1414](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1414) F5 key *** ### F6 > **F6**: `92` Defined in: [index.d.ts:1416](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1416) F6 key *** ### F7 > **F7**: `93` Defined in: [index.d.ts:1418](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1418) F7 key *** ### F8 > **F8**: `94` Defined in: [index.d.ts:1420](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1420) F8 key *** ### F9 > **F9**: `95` Defined in: [index.d.ts:1422](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1422) F9 key *** ### Final > **Final**: `123` Defined in: [index.d.ts:1465](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1465) *** ### Find > **Find**: `124` Defined in: [index.d.ts:1466](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1466) *** ### Function > **Function**: `122` Defined in: [index.d.ts:1464](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1464) *** ### G > **G**: `16` Defined in: [index.d.ts:1326](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1326) *** ### GamepadA > **GamepadA**: `125` Defined in: [index.d.ts:1467](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1467) *** ### GamepadB > **GamepadB**: `126` Defined in: [index.d.ts:1468](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1468) *** ### GamepadDPadDown > **GamepadDPadDown**: `127` Defined in: [index.d.ts:1469](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1469) *** ### GamepadDPadLeft > **GamepadDPadLeft**: `128` Defined in: [index.d.ts:1470](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1470) *** ### GamepadDPadRight > **GamepadDPadRight**: `129` Defined in: [index.d.ts:1471](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1471) *** ### GamepadDPadUp > **GamepadDPadUp**: `130` Defined in: [index.d.ts:1472](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1472) *** ### GamepadLeftShoulder > **GamepadLeftShoulder**: `131` Defined in: [index.d.ts:1473](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1473) *** ### GamepadLeftThumbstickButton > **GamepadLeftThumbstickButton**: `132` Defined in: [index.d.ts:1474](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1474) *** ### GamepadLeftThumbstickDown > **GamepadLeftThumbstickDown**: `133` Defined in: [index.d.ts:1475](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1475) *** ### GamepadLeftThumbstickLeft > **GamepadLeftThumbstickLeft**: `134` Defined in: [index.d.ts:1476](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1476) *** ### GamepadLeftThumbstickRight > **GamepadLeftThumbstickRight**: `135` Defined in: [index.d.ts:1477](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1477) *** ### GamepadLeftThumbstickUp > **GamepadLeftThumbstickUp**: `136` Defined in: [index.d.ts:1478](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1478) *** ### GamepadLeftTrigger > **GamepadLeftTrigger**: `137` Defined in: [index.d.ts:1479](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1479) *** ### GamepadMenu > **GamepadMenu**: `138` Defined in: [index.d.ts:1480](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1480) *** ### GamepadRightShoulder > **GamepadRightShoulder**: `139` Defined in: [index.d.ts:1481](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1481) *** ### GamepadRightThumbstickButton > **GamepadRightThumbstickButton**: `140` Defined in: [index.d.ts:1482](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1482) *** ### GamepadRightThumbstickDown > **GamepadRightThumbstickDown**: `141` Defined in: [index.d.ts:1483](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1483) *** ### GamepadRightThumbstickLeft > **GamepadRightThumbstickLeft**: `142` Defined in: [index.d.ts:1484](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1484) *** ### GamepadRightThumbstickRight > **GamepadRightThumbstickRight**: `143` Defined in: [index.d.ts:1485](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1485) *** ### GamepadRightThumbstickUp > **GamepadRightThumbstickUp**: `144` Defined in: [index.d.ts:1486](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1486) *** ### GamepadRightTrigger > **GamepadRightTrigger**: `145` Defined in: [index.d.ts:1487](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1487) *** ### GamepadView > **GamepadView**: `146` Defined in: [index.d.ts:1488](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1488) *** ### GamepadX > **GamepadX**: `147` Defined in: [index.d.ts:1489](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1489) *** ### GamepadY > **GamepadY**: `148` Defined in: [index.d.ts:1490](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1490) *** ### H > **H**: `17` Defined in: [index.d.ts:1327](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1327) *** ### Hangeul > **Hangeul**: `149` Defined in: [index.d.ts:1491](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1491) *** ### Hangul > **Hangul**: `150` Defined in: [index.d.ts:1492](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1492) *** ### Hanja > **Hanja**: `151` Defined in: [index.d.ts:1493](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1493) *** ### Help > **Help**: `152` Defined in: [index.d.ts:1494](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1494) *** ### Home > **Home**: `153` Defined in: [index.d.ts:1496](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1496) home key *** ### I > **I**: `18` Defined in: [index.d.ts:1328](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1328) *** ### Ico00 > **Ico00**: `154` Defined in: [index.d.ts:1497](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1497) *** ### IcoClear > **IcoClear**: `155` Defined in: [index.d.ts:1498](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1498) *** ### IcoHelp > **IcoHelp**: `156` Defined in: [index.d.ts:1499](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1499) *** ### IlluminationDown > **IlluminationDown**: `157` Defined in: [index.d.ts:1500](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1500) *** ### IlluminationToggle > **IlluminationToggle**: `159` Defined in: [index.d.ts:1502](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1502) *** ### IlluminationUp > **IlluminationUp**: `158` Defined in: [index.d.ts:1501](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1501) *** ### IMEOff > **IMEOff**: `160` Defined in: [index.d.ts:1503](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1503) *** ### IMEOn > **IMEOn**: `161` Defined in: [index.d.ts:1504](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1504) *** ### Insert > **Insert**: `162` Defined in: [index.d.ts:1505](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1505) *** ### J > **J**: `19` Defined in: [index.d.ts:1329](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1329) *** ### Junja > **Junja**: `163` Defined in: [index.d.ts:1506](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1506) *** ### K > **K**: `20` Defined in: [index.d.ts:1330](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1330) *** ### Kana > **Kana**: `164` Defined in: [index.d.ts:1507](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1507) *** ### Kanji > **Kanji**: `165` Defined in: [index.d.ts:1508](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1508) *** ### L > **L**: `21` Defined in: [index.d.ts:1331](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1331) *** ### LaunchApp1 > **LaunchApp1**: `166` Defined in: [index.d.ts:1509](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1509) *** ### LaunchApp2 > **LaunchApp2**: `167` Defined in: [index.d.ts:1510](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1510) *** ### LaunchMail > **LaunchMail**: `168` Defined in: [index.d.ts:1511](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1511) *** ### LaunchMediaSelect > **LaunchMediaSelect**: `169` Defined in: [index.d.ts:1512](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1512) *** ### Launchpad > **Launchpad**: `170` Defined in: [index.d.ts:1514](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1514) Opens launchpad *** ### LaunchPanel > **LaunchPanel**: `171` Defined in: [index.d.ts:1515](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1515) *** ### LButton > **LButton**: `172` Defined in: [index.d.ts:1516](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1516) *** ### LControl > **LControl**: `173` Defined in: [index.d.ts:1517](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1517) *** ### LeftArrow > **LeftArrow**: `174` Defined in: [index.d.ts:1519](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1519) left arrow key *** ### Linefeed > **Linefeed**: `175` Defined in: [index.d.ts:1520](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1520) *** ### LMenu > **LMenu**: `176` Defined in: [index.d.ts:1521](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1521) *** ### LShift > **LShift**: `177` Defined in: [index.d.ts:1522](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1522) *** ### LWin > **LWin**: `178` Defined in: [index.d.ts:1523](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1523) *** ### M > **M**: `22` Defined in: [index.d.ts:1332](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1332) *** ### MButton > **MButton**: `179` Defined in: [index.d.ts:1524](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1524) *** ### MediaFast > **MediaFast**: `180` Defined in: [index.d.ts:1525](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1525) *** ### MediaNextTrack > **MediaNextTrack**: `181` Defined in: [index.d.ts:1526](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1526) *** ### MediaPlayPause > **MediaPlayPause**: `182` Defined in: [index.d.ts:1527](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1527) *** ### MediaPrevTrack > **MediaPrevTrack**: `183` Defined in: [index.d.ts:1528](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1528) *** ### MediaRewind > **MediaRewind**: `184` Defined in: [index.d.ts:1529](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1529) *** ### MediaStop > **MediaStop**: `185` Defined in: [index.d.ts:1530](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1530) *** ### Meta > **Meta**: `186` Defined in: [index.d.ts:1532](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1532) meta key (also known as "windows", "super", and "command") *** ### MicMute > **MicMute**: `286` Defined in: [index.d.ts:1647](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1647) microphone mute toggle on linux *** ### MissionControl > **MissionControl**: `187` Defined in: [index.d.ts:1534](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1534) Opens mission control *** ### ModeChange > **ModeChange**: `188` Defined in: [index.d.ts:1535](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1535) *** ### Multiply > **Multiply**: `189` Defined in: [index.d.ts:1536](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1536) *** ### N > **N**: `23` Defined in: [index.d.ts:1333](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1333) *** ### NavigationAccept > **NavigationAccept**: `190` Defined in: [index.d.ts:1537](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1537) *** ### NavigationCancel > **NavigationCancel**: `191` Defined in: [index.d.ts:1538](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1538) *** ### NavigationDown > **NavigationDown**: `192` Defined in: [index.d.ts:1539](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1539) *** ### NavigationLeft > **NavigationLeft**: `193` Defined in: [index.d.ts:1540](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1540) *** ### NavigationMenu > **NavigationMenu**: `194` Defined in: [index.d.ts:1541](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1541) *** ### NavigationRight > **NavigationRight**: `195` Defined in: [index.d.ts:1542](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1542) *** ### NavigationUp > **NavigationUp**: `196` Defined in: [index.d.ts:1543](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1543) *** ### NavigationView > **NavigationView**: `197` Defined in: [index.d.ts:1544](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1544) *** ### NoName > **NoName**: `198` Defined in: [index.d.ts:1545](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1545) *** ### NonConvert > **NonConvert**: `199` Defined in: [index.d.ts:1546](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1546) *** ### None > **None**: `200` Defined in: [index.d.ts:1547](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1547) *** ### Num0 > **Num0**: `0` Defined in: [index.d.ts:1310](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1310) *** ### Num1 > **Num1**: `1` Defined in: [index.d.ts:1311](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1311) *** ### Num2 > **Num2**: `2` Defined in: [index.d.ts:1312](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1312) *** ### Num3 > **Num3**: `3` Defined in: [index.d.ts:1313](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1313) *** ### Num4 > **Num4**: `4` Defined in: [index.d.ts:1314](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1314) *** ### Num5 > **Num5**: `5` Defined in: [index.d.ts:1315](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1315) *** ### Num6 > **Num6**: `6` Defined in: [index.d.ts:1316](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1316) *** ### Num7 > **Num7**: `7` Defined in: [index.d.ts:1317](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1317) *** ### Num8 > **Num8**: `8` Defined in: [index.d.ts:1318](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1318) *** ### Num9 > **Num9**: `9` Defined in: [index.d.ts:1319](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1319) *** ### Numlock > **Numlock**: `201` Defined in: [index.d.ts:1549](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1549) Num lock *** ### Numpad0 > **Numpad0**: `202` Defined in: [index.d.ts:1550](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1550) *** ### Numpad1 > **Numpad1**: `203` Defined in: [index.d.ts:1551](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1551) *** ### Numpad2 > **Numpad2**: `204` Defined in: [index.d.ts:1552](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1552) *** ### Numpad3 > **Numpad3**: `205` Defined in: [index.d.ts:1553](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1553) *** ### Numpad4 > **Numpad4**: `206` Defined in: [index.d.ts:1554](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1554) *** ### Numpad5 > **Numpad5**: `207` Defined in: [index.d.ts:1555](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1555) *** ### Numpad6 > **Numpad6**: `208` Defined in: [index.d.ts:1556](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1556) *** ### Numpad7 > **Numpad7**: `209` Defined in: [index.d.ts:1557](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1557) *** ### Numpad8 > **Numpad8**: `210` Defined in: [index.d.ts:1558](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1558) *** ### Numpad9 > **Numpad9**: `211` Defined in: [index.d.ts:1559](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1559) *** ### NumpadEnter > **NumpadEnter**: `212` Defined in: [index.d.ts:1560](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1560) *** ### O > **O**: `24` Defined in: [index.d.ts:1334](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1334) *** ### OEM1 > **OEM1**: `213` Defined in: [index.d.ts:1561](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1561) *** ### OEM102 > **OEM102**: `214` Defined in: [index.d.ts:1562](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1562) *** ### OEM2 > **OEM2**: `215` Defined in: [index.d.ts:1563](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1563) *** ### OEM3 > **OEM3**: `216` Defined in: [index.d.ts:1564](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1564) *** ### OEM4 > **OEM4**: `217` Defined in: [index.d.ts:1565](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1565) *** ### OEM5 > **OEM5**: `218` Defined in: [index.d.ts:1566](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1566) *** ### OEM6 > **OEM6**: `219` Defined in: [index.d.ts:1567](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1567) *** ### OEM7 > **OEM7**: `220` Defined in: [index.d.ts:1568](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1568) *** ### OEM8 > **OEM8**: `221` Defined in: [index.d.ts:1569](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1569) *** ### OEMAttn > **OEMAttn**: `222` Defined in: [index.d.ts:1570](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1570) *** ### OEMAuto > **OEMAuto**: `223` Defined in: [index.d.ts:1571](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1571) *** ### OEMAx > **OEMAx**: `224` Defined in: [index.d.ts:1572](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1572) *** ### OEMBacktab > **OEMBacktab**: `225` Defined in: [index.d.ts:1573](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1573) *** ### OEMClear > **OEMClear**: `226` Defined in: [index.d.ts:1574](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1574) *** ### OEMComma > **OEMComma**: `227` Defined in: [index.d.ts:1575](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1575) *** ### OEMCopy > **OEMCopy**: `228` Defined in: [index.d.ts:1576](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1576) *** ### OEMCusel > **OEMCusel**: `229` Defined in: [index.d.ts:1577](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1577) *** ### OEMEnlw > **OEMEnlw**: `230` Defined in: [index.d.ts:1578](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1578) *** ### OEMFinish > **OEMFinish**: `231` Defined in: [index.d.ts:1579](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1579) *** ### OEMFJJisho > **OEMFJJisho**: `232` Defined in: [index.d.ts:1580](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1580) *** ### OEMFJLoya > **OEMFJLoya**: `233` Defined in: [index.d.ts:1581](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1581) *** ### OEMFJMasshou > **OEMFJMasshou**: `234` Defined in: [index.d.ts:1582](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1582) *** ### OEMFJRoya > **OEMFJRoya**: `235` Defined in: [index.d.ts:1583](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1583) *** ### OEMFJTouroku > **OEMFJTouroku**: `236` Defined in: [index.d.ts:1584](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1584) *** ### OEMJump > **OEMJump**: `237` Defined in: [index.d.ts:1585](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1585) *** ### OEMMinus > **OEMMinus**: `238` Defined in: [index.d.ts:1586](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1586) *** ### OEMNECEqual > **OEMNECEqual**: `239` Defined in: [index.d.ts:1587](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1587) *** ### OEMPA1 > **OEMPA1**: `240` Defined in: [index.d.ts:1588](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1588) *** ### OEMPA2 > **OEMPA2**: `241` Defined in: [index.d.ts:1589](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1589) *** ### OEMPA3 > **OEMPA3**: `242` Defined in: [index.d.ts:1590](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1590) *** ### OEMPeriod > **OEMPeriod**: `243` Defined in: [index.d.ts:1591](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1591) *** ### OEMPlus > **OEMPlus**: `244` Defined in: [index.d.ts:1592](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1592) *** ### OEMReset > **OEMReset**: `245` Defined in: [index.d.ts:1593](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1593) *** ### OEMWsctrl > **OEMWsctrl**: `246` Defined in: [index.d.ts:1594](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1594) *** ### Option > **Option**: `247` Defined in: [index.d.ts:1596](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1596) option key on macOS (alt key on Linux and Windows) *** ### Other > **Other**: `291` Defined in: [index.d.ts:1654](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1654) Use `key_other` to provide the raw key value. *** ### P > **P**: `25` Defined in: [index.d.ts:1335](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1335) *** ### PA1 > **PA1**: `248` Defined in: [index.d.ts:1597](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1597) *** ### Packet > **Packet**: `249` Defined in: [index.d.ts:1598](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1598) *** ### PageDown > **PageDown**: `250` Defined in: [index.d.ts:1600](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1600) page down key *** ### PageUp > **PageUp**: `251` Defined in: [index.d.ts:1602](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1602) page up key *** ### Pause > **Pause**: `252` Defined in: [index.d.ts:1603](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1603) *** ### Play > **Play**: `253` Defined in: [index.d.ts:1604](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1604) *** ### Power > **Power**: `254` Defined in: [index.d.ts:1605](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1605) *** ### Print > **Print**: `255` Defined in: [index.d.ts:1607](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1607) Print key (e.g. print screen / `SysRq` on some keyboards) *** ### PrintScr > **PrintScr**: `256` Defined in: [index.d.ts:1609](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1609) Take a screenshot *** ### Processkey > **Processkey**: `257` Defined in: [index.d.ts:1610](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1610) *** ### Q > **Q**: `26` Defined in: [index.d.ts:1336](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1336) *** ### R > **R**: `27` Defined in: [index.d.ts:1337](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1337) *** ### RButton > **RButton**: `258` Defined in: [index.d.ts:1611](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1611) *** ### RCommand > **RCommand**: `259` Defined in: [index.d.ts:1612](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1612) *** ### RControl > **RControl**: `260` Defined in: [index.d.ts:1613](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1613) *** ### Redo > **Redo**: `261` Defined in: [index.d.ts:1614](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1614) *** ### Return > **Return**: `262` Defined in: [index.d.ts:1616](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1616) return key *** ### RightArrow > **RightArrow**: `263` Defined in: [index.d.ts:1618](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1618) right arrow key *** ### RMenu > **RMenu**: `264` Defined in: [index.d.ts:1619](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1619) *** ### ROption > **ROption**: `265` Defined in: [index.d.ts:1620](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1620) *** ### RShift > **RShift**: `266` Defined in: [index.d.ts:1621](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1621) *** ### RWin > **RWin**: `267` Defined in: [index.d.ts:1622](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1622) *** ### S > **S**: `28` Defined in: [index.d.ts:1338](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1338) *** ### ScriptSwitch > **ScriptSwitch**: `271` Defined in: [index.d.ts:1626](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1626) *** ### Scroll > **Scroll**: `268` Defined in: [index.d.ts:1623](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1623) *** ### ScrollLock > **ScrollLock**: `269` Defined in: [index.d.ts:1624](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1624) *** ### Select > **Select**: `270` Defined in: [index.d.ts:1625](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1625) *** ### Separator > **Separator**: `272` Defined in: [index.d.ts:1627](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1627) *** ### Shift > **Shift**: `273` Defined in: [index.d.ts:1629](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1629) shift key *** ### ShiftLock > **ShiftLock**: `274` Defined in: [index.d.ts:1631](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1631) Lock shift key *** ### Sleep > **Sleep**: `275` Defined in: [index.d.ts:1632](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1632) *** ### Space > **Space**: `276` Defined in: [index.d.ts:1634](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1634) space key *** ### Subtract > **Subtract**: `277` Defined in: [index.d.ts:1635](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1635) *** ### SysReq > **SysReq**: `278` Defined in: [index.d.ts:1636](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1636) *** ### T > **T**: `29` Defined in: [index.d.ts:1339](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1339) *** ### Tab > **Tab**: `279` Defined in: [index.d.ts:1638](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1638) tab key (tabulator) *** ### U > **U**: `30` Defined in: [index.d.ts:1340](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1340) *** ### Undo > **Undo**: `280` Defined in: [index.d.ts:1639](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1639) *** ### Unicode > **Unicode**: `290` Defined in: [index.d.ts:1652](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1652) Use `key_unicode` to provide the character. *** ### UpArrow > **UpArrow**: `281` Defined in: [index.d.ts:1641](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1641) up arrow key *** ### V > **V**: `31` Defined in: [index.d.ts:1341](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1341) *** ### VidMirror > **VidMirror**: `282` Defined in: [index.d.ts:1642](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1642) *** ### VolumeDown > **VolumeDown**: `283` Defined in: [index.d.ts:1643](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1643) *** ### VolumeMute > **VolumeMute**: `284` Defined in: [index.d.ts:1644](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1644) *** ### VolumeUp > **VolumeUp**: `285` Defined in: [index.d.ts:1645](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1645) *** ### W > **W**: `32` Defined in: [index.d.ts:1342](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1342) *** ### X > **X**: `33` Defined in: [index.d.ts:1343](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1343) *** ### XButton1 > **XButton1**: `287` Defined in: [index.d.ts:1648](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1648) *** ### XButton2 > **XButton2**: `288` Defined in: [index.d.ts:1649](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1649) *** ### Y > **Y**: `34` Defined in: [index.d.ts:1344](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1344) *** ### Z > **Z**: `35` Defined in: [index.d.ts:1345](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1345) *** ### Zoom > **Zoom**: `289` Defined in: [index.d.ts:1650](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1650) # TraversalOrder Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/TraversalOrder # Enumeration: TraversalOrder Defined in: [index.d.ts:1681](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1681) Tree traversal order for `AccessibilityTree.find()`. ## Enumeration Members ### BreadthFirst > **BreadthFirst**: `1` Defined in: [index.d.ts:1685](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1685) Level-order breadth-first (parents before children). *** ### DepthFirst > **DepthFirst**: `0` Defined in: [index.d.ts:1683](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1683) Pre-order depth-first (each node before its descendants). # Visibility Source: https://docs.simular.ai/simulang-js/api/v6.0.1/enumerations/Visibility # Enumeration: Visibility Defined in: [index.d.ts:1689](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1689) Visibility behavior when opening an application. ## Enumeration Members ### Hidden > **Hidden**: `0` Defined in: [index.d.ts:1691](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1691) Launch hidden when supported by the platform. *** ### Show > **Show**: `1` Defined in: [index.d.ts:1693](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1693) Launch in a visible state. # AriaRoleToString Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/ariaRoleToString # Function: ariaRoleToString() > **ariaRoleToString**(`role`): `string` Defined in: [index.d.ts:1192](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1192) Lowercase ARIA name for a role β€” matches the form used in snapshot output and accepted by `AccessibilityTree.find()`. `AriaRole` is exposed to JS as a numeric enum, so the usual TypeScript reverse-mapping trick (`AriaRole[role]`) does not work; use this function instead. ## Parameters ### role [`AriaRole`](../enumerations/AriaRole.mdx) ## Returns `string` # EnableAccessibilityForFrontmostApp Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/enableAccessibilityForFrontmostApp # Function: enableAccessibilityForFrontmostApp() > **enableAccessibilityForFrontmostApp**(): `void` Defined in: [index.d.ts:1232](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1232) Enables the accessibility tree for the frontmost application. ## Returns `void` # HasScreenCapturePermission Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/hasScreenCapturePermission # Function: hasScreenCapturePermission() > **hasScreenCapturePermission**(): `boolean` Defined in: [index.d.ts:1245](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1245) ## Returns `boolean` # InitLogger Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/initLogger # Function: initLogger() > **initLogger**(`cb?`, `spec?`): `void` Defined in: [index.d.ts:1286](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1286) Initialize the logger. **You usually don't need to call this.** The package's `main` entry (`wrapped.js`) calls `initLogger()` with no arguments on first evaluation, so simply `import '@simular-ai/simulang-js'` is enough to see `[level] message` records on stderr. Call this directly only when you want to *override* that default β€” to forward records to a JS callback, change the filter spec, or silence everything. * **No callback** (`initLogger()` or `initLogger(null, spec)`): records are formatted as `[level] message` and written to stderr. * **With a callback** (`initLogger(cb, spec)`): records are forwarded to the JS callback via a non-blocking, unref'd threadsafe function. Use this for GUI panels, file appenders, or routing through a logging library like pino. The unref'd dispatch means the logger does not keep the Node event loop alive on its own. Omit `spec` to read `RUST_LOG` (falls back to `"simulang_rs=info,warn"` when `RUST_LOG` is unset β€” info-level records from simulang's own actions, warn-level from every other crate). Pass an explicit `spec` to override `RUST_LOG`. Syntax is identical to `RUST_LOG`: * `"info"` β€” global level * `"simulang_rs=debug,warn"` β€” per-module override + default * `"simulang_rs::windows=trace,simulang_rs::macos=debug,warn"` β€” multiple * `"off"` β€” disable all logging Safe to call repeatedly: each call atomically swaps the inner sink and filter β€” useful for e.g. starting on stderr at boot and switching to a renderer callback once the UI is ready. **Don't log from inside the callback.** Whether directly (`console.log` is fine β€” that's not a `log::*!` call) or transitively via another `simulang-js` function whose Rust side emits a record, you'd feed the relay another record, which queues another callback invocation, and so on forever. The callback itself runs on the Node main thread; the non-blocking dispatch from Rust is what creates the recursion risk. ## Parameters ### cb? ((`arg`) => `unknown`) | `null` ### spec? `string` | `null` ## Returns `void` # KeyFromString Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/keyFromString # Function: keyFromString() > **keyFromString**(`value`): [`Key`](../enumerations/Key.mdx) Defined in: [index.d.ts:1658](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1658) Convert a string representation into a `Key`. ## Parameters ### value `string` ## Returns [`Key`](../enumerations/Key.mdx) # LegacyOpen Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/legacyOpen # Function: legacyOpen() > **legacyOpen**(`app`, `url`, `focusPolicy`, `visibility`): `void` Defined in: [index.d.ts:1661](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1661) Legacy helper used by Electron to open an app or URL. ## Parameters ### app `string` | `null` | `undefined` ### url `string` | `null` | `undefined` ### focusPolicy [`FocusPolicy`](../enumerations/FocusPolicy.mdx) ### visibility [`Visibility`](../enumerations/Visibility.mdx) ## Returns `void` # LegacyTakeScreenshot Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/legacyTakeScreenshot # Function: legacyTakeScreenshot() > **legacyTakeScreenshot**(`needsCompression`, `shrinkTo1080P`): `string` Defined in: [index.d.ts:1664](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1664) Legacy helper used by Electron to capture a screenshot as base64. ## Parameters ### needsCompression `boolean` ### shrinkTo1080P `boolean` ## Returns `string` # ReadFile Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/readFile # Function: readFile() > **readFile**(`path`): `string` Defined in: [index.d.ts:1672](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1672) Reads a file and returns its trimmed contents. If the path is relative, it is resolved against the default cache location. ## Parameters ### path `string` ## Returns `string` # ScreenshotCropped Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/screenshotCropped # Function: screenshotCropped() > **screenshotCropped**(`x`, `y`, `width`, `height`, `hideCursor`): [`Screenshot`](../classes/Screenshot.mdx) Defined in: [index.d.ts:1675](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1675) Takes the screenshot of a cropped region of the workspace. ## Parameters ### x `number` ### y `number` ### width `number` ### height `number` ### hideCursor `boolean` ## Returns [`Screenshot`](../classes/Screenshot.mdx) # ScreenshotFull Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/screenshotFull # Function: screenshotFull() > **screenshotFull**(`hideCursor`, `screen`): [`Screenshot`](../classes/Screenshot.mdx) Defined in: [index.d.ts:1678](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1678) Takes the screenshot of the entire selected screen ## Parameters ### hideCursor `boolean` ### screen [`Screen`](../classes/Screen.mdx) ## Returns [`Screenshot`](../classes/Screenshot.mdx) # WriteFile Source: https://docs.simular.ai/simulang-js/api/v6.0.1/functions/writeFile # Function: writeFile() > **writeFile**(`path`, `content`, `append`): `string` Defined in: [index.d.ts:1704](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1704) Writes content to a file, returning the absolute path written to. If the path is relative, it is resolved against the default cache location. When `append` is true and the file already has content, a newline is inserted before appending the new content. When `append` is false, the file is overwritten. ## Parameters ### path `string` ### content `string` ### append `boolean` ## Returns `string` # V6.0.1 Source: https://docs.simular.ai/simulang-js/api/v6.0.1/index # `@simular-ai/simulang-js` ![CI](https://github.com/simular-ai/simulang-js/workflows/CI/badge.svg) Node.js bindings for [`simulang-rs`](https://github.com/simular-ai/simulang-rs), a Rust crate published by [Simular](https://simular.ai), built with [`napi-rs`](https://napi.rs/). Provides high-level primitives for desktop automation β€” keyboard and mouse input, screenshots, clipboard access, audio capture, accessibility-tree inspection, and more β€” exposed through idiomatic JavaScript. Ships TypeScript definitions auto-generated from the Rust source, so the types always match runtime behavior. ## Install ```bash theme={null} npm install @simular-ai/simulang-js ``` Prebuilt native binaries are published for: | Platform | Architecture | | -------- | ----------------------------------- | | macOS | `aarch64` (Apple Silicon), `x86_64` | | Windows | `x86_64`, `aarch64` | | Linux | `x86_64`, `aarch64` (glibc) | Node.js **20 or newer** is required. If your platform isn't covered, see [Building from source](#building-from-source). ### Optional β€” install the log viewer The [`log-window.mjs`](_media/log-window.mjs) example uses [`@simular-ai/simulang-log-viewer`](https://github.com/simular-ai/simulang-log-viewer), which is declared as an **optional peer dependency** and **not** installed by default. Install it only if you want to run that example or use the same pattern in your own code: ```bash theme={null} npm install @simular-ai/simulang-log-viewer ``` ## Usage Try the included [`google_search.mjs`](_media/google_search.mjs) example β€” it opens Google in Chrome, enables the accessibility tree, takes a screenshot, and displays it: ```bash theme={null} # With the simulang CLI (no local install needed): npm install -g @simular-ai/simulang simulang run examples/google_search.mjs # Or directly with Node.js if you have simulang-js installed locally: node examples/google_search.mjs ``` ## API documentation Browse the [API reference](https://docs.simular.ai/simulang-js/api/latest/) for more details. A bleeding-edge preview of HEAD on `main` is also published to [GitHub Pages](https://simular-ai.github.io/simulang-js/) between releases. ## Using with Claude Code This package ships a short [`CLAUDE.md`](_media/CLAUDE.md) inside the npm tarball that points Claude Code at `index.d.ts` as the source of truth for the API and adds a few cross-cutting notes that types alone can't express (lifetime rules, coordinate system, etc.). Wire it into your project's `CLAUDE.md` with: ```bash theme={null} npx simulang-init-claude # appends to /CLAUDE.md (creates it if missing) npx simulang-init-claude --user # appends to ~/.claude/CLAUDE.md instead npx simulang-init-claude --check # report status, don't write ``` The added line is a single `@./node_modules/@simular-ai/simulang-js/CLAUDE.md` import inside a sentinel-delimited block β€” safe to re-run, no-op when already present. ## Relationship to `simulang` [`@simular-ai/simulang`](https://github.com/simular-ai/simulang-cli) is a CLI that runs desktop automation scripts (`.ts`, `.js`, `.simulang`) using this package. It bundles `simulang-js` and re-exports the full API to scripts, so you can write and run automation scripts without a build step: ```bash theme={null} npm install -g @simular-ai/simulang simulang run my-script.js ``` `simulang-js` is the underlying primitive library; `simulang` is the batteries-included script runner built on top of it. If you are embedding desktop automation into your own Node.js application, depend on `simulang-js` directly. If you just want to run standalone automation scripts, `simulang` is the easier starting point. You can also point `simulang` at a local `simulang-js` checkout during development: ```bash theme={null} simulang run --simulang-js=/path/to/simulang-js my-script.js ``` ## Enumerations | Enumeration | Description | | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | [AriaRole](enumerations/AriaRole.mdx) | Cross-platform ARIA / Playwright role. Used as the `role` field on accessibility snapshots and as the search key in \[`AccessibilityTree::find`]. | | [Button](enumerations/Button.mdx) | Represents a mouse button. | | [Coordinate](enumerations/Coordinate.mdx) | Specifies if coordinates are relative or absolute. | | [Direction](enumerations/Direction.mdx) | The direction of a button event. | | [FocusPolicy](enumerations/FocusPolicy.mdx) | Focus behavior when opening an application. | | [Key](enumerations/Key.mdx) | Represents a keyboard key. | | [TraversalOrder](enumerations/TraversalOrder.mdx) | Tree traversal order for `AccessibilityTree.find()`. | | [Visibility](enumerations/Visibility.mdx) | Visibility behavior when opening an application. | ## Classes | Class | Description | | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [AccessibilityNode](classes/AccessibilityNode.mdx) | A node in the platform accessibility tree. Thin binding for `simulang_rs::AXNode` (macOS `AXUIElement` / Windows UIA element / Linux AT-SPI accessible). | | [AccessibilityTree](classes/AccessibilityTree.mdx) | Accessibility tree bound to a specific window. Provides snapshot and ref-based actions for desktop automation (Windows UIA). | | [App](classes/App.mdx) | Represents an application that can be opened. | | [AskModel](classes/AskModel.mdx) | A free-form chat-completions LLM (optionally vision-capable) β€” the JS analogue of the `ask` primitive. | | [AudioOutput](classes/AudioOutput.mdx) | Handle to an open audio output device. Must be kept alive for playback to continue β€” when dropped all associated `Player`s stop producing sound. | | [Clipboard](classes/Clipboard.mdx) | Contains functions to read and write the clipboard. | | [Directory](classes/Directory.mdx) | Represents a directory handle. | | [File](classes/File.mdx) | Represents a file handle. | | [GroundingModel](classes/GroundingModel.mdx) | A visual-language grounding model that can locate concepts on images. | | [Image](classes/Image.mdx) | Represents an image. | | [Instance](classes/Instance.mdx) | Represents an opened application instance. | | [KeyboardController](classes/KeyboardController.mdx) | Contains functions to simulate key presses/releases and to input text. | | [LoopbackSource](classes/LoopbackSource.mdx) | A loopback capture source that records system audio output (what the user hears through their speakers or headphones). | | [MouseController](classes/MouseController.mdx) | Contains functions to control the mouse and to get the location of the cursor. A cartesian coordinate system is used for specifying coordinates. The origin is located in the top-left corner of the current screen, with positive values extending along the axes down and to the right of the origin point and it is measured in pixels. The same coordinate system is used on all operating systems. | | [Player](classes/Player.mdx) | Handle to a device that outputs sounds. | | [SamplesBuffer](classes/SamplesBuffer.mdx) | A buffer of samples treated as a source. | | [Screen](classes/Screen.mdx) | Represents a physical display/screen. | | [Screenshot](classes/Screenshot.mdx) | Represents a screenshot capture. | | [ScreenshotCoordinateType](classes/ScreenshotCoordinateType.mdx) | Describes how `(x, y)` coordinates passed to `Screenshot.toGlobalPhysicalPixels` should be interpreted. | | [SttModel](classes/SttModel.mdx) | A speech-to-text model that can transcribe audio. | | [System](classes/System.mdx) | Provides system-wide operations. | | [Window](classes/Window.mdx) | Handle to an on-screen window. Constructed via \[`Window.all`] or \[`Window.allForPid`] and exposes read-only metadata (`title`, `pid`) alongside basic actions (`minimize`, `maximize`, `close`). | ## Interfaces | Interface | Description | | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | [AccessibilityNodeJs](interfaces/AccessibilityNodeJs.mdx) | - | | [BoundingBox](interfaces/BoundingBox.mdx) | Axis-aligned rectangle. `right` and `bottom` are exclusive (Playwright / DOM convention), so the box covers `[left, right) Γ— [top, bottom)`. | | [JsLogRecord](interfaces/JsLogRecord.mdx) | A single log entry forwarded to the JS callback. | ## Functions | Function | Description | | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | [ariaRoleToString](functions/ariaRoleToString.mdx) | Lowercase ARIA name for a role β€” matches the form used in snapshot output and accepted by `AccessibilityTree.find()`. | | [enableAccessibilityForFrontmostApp](functions/enableAccessibilityForFrontmostApp.mdx) | Enables the accessibility tree for the frontmost application. | | [hasScreenCapturePermission](functions/hasScreenCapturePermission.mdx) | - | | [initLogger](functions/initLogger.mdx) | Initialize the logger. | | [keyFromString](functions/keyFromString.mdx) | Convert a string representation into a `Key`. | | [legacyOpen](functions/legacyOpen.mdx) | Legacy helper used by Electron to open an app or URL. | | [legacyTakeScreenshot](functions/legacyTakeScreenshot.mdx) | Legacy helper used by Electron to capture a screenshot as base64. | | [readFile](functions/readFile.mdx) | Reads a file and returns its trimmed contents. | | [screenshotCropped](functions/screenshotCropped.mdx) | Takes the screenshot of a cropped region of the workspace. | | [screenshotFull](functions/screenshotFull.mdx) | Takes the screenshot of the entire selected screen | | [writeFile](functions/writeFile.mdx) | Writes content to a file, returning the absolute path written to. | # AccessibilityNodeJs Source: https://docs.simular.ai/simulang-js/api/v6.0.1/interfaces/AccessibilityNodeJs # Interface: AccessibilityNodeJs Defined in: [index.d.ts:1071](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1071) ## Properties ### automationId > **automationId**: `string` Defined in: [index.d.ts:1081](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1081) *** ### boundingBox > **boundingBox**: [`BoundingBox`](BoundingBox.mdx) Defined in: [index.d.ts:1083](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1083) *** ### children > **children**: `AccessibilityNodeJs`\[] Defined in: [index.d.ts:1084](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1084) *** ### className > **className**: `string` Defined in: [index.d.ts:1074](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1074) *** ### controlType > **controlType**: `number` Defined in: [index.d.ts:1075](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1075) *** ### description > **description**: `string` Defined in: [index.d.ts:1077](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1077) *** ### helpText > **helpText**: `string` Defined in: [index.d.ts:1079](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1079) *** ### isEnabled > **isEnabled**: `boolean` Defined in: [index.d.ts:1082](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1082) *** ### localizedControlType > **localizedControlType**: `string` Defined in: [index.d.ts:1076](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1076) *** ### name > **name**: `string` Defined in: [index.d.ts:1073](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1073) *** ### overallDescription > **overallDescription**: `string` Defined in: [index.d.ts:1078](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1078) *** ### refId? > `optional` **refId?**: `number` Defined in: [index.d.ts:1085](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1085) *** ### role > **role**: [`AriaRole`](../enumerations/AriaRole.mdx) Defined in: [index.d.ts:1072](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1072) *** ### value > **value**: `string` Defined in: [index.d.ts:1080](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1080) # BoundingBox Source: https://docs.simular.ai/simulang-js/api/v6.0.1/interfaces/BoundingBox # Interface: BoundingBox Defined in: [index.d.ts:1198](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1198) Axis-aligned rectangle. `right` and `bottom` are exclusive (Playwright / DOM convention), so the box covers `[left, right) Γ— [top, bottom)`. ## Properties ### bottom > **bottom**: `number` Defined in: [index.d.ts:1202](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1202) *** ### left > **left**: `number` Defined in: [index.d.ts:1199](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1199) *** ### right > **right**: `number` Defined in: [index.d.ts:1201](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1201) *** ### top > **top**: `number` Defined in: [index.d.ts:1200](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1200) # JsLogRecord Source: https://docs.simular.ai/simulang-js/api/v6.0.1/interfaces/JsLogRecord # Interface: JsLogRecord Defined in: [index.d.ts:1289](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1289) A single log entry forwarded to the JS callback. ## Properties ### file? > `optional` **file?**: `string` Defined in: [index.d.ts:1301](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1301) Source file path of the call site, when available. *** ### level > **level**: `string` Defined in: [index.d.ts:1291](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1291) `"error"`, `"warn"`, `"info"`, `"debug"`, or `"trace"`. *** ### line? > `optional` **line?**: `number` Defined in: [index.d.ts:1303](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1303) 1-based line number of the call site, when available. *** ### message > **message**: `string` Defined in: [index.d.ts:1299](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1299) The formatted log message. *** ### modulePath? > `optional` **modulePath?**: `string` Defined in: [index.d.ts:1305](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1305) Module path of the call site, when available. *** ### target > **target**: `string` Defined in: [index.d.ts:1297](https://github.com/simular-ai/simulang-js-internal/blob/d2b85c3277cbb16ce50c0781e1db8ad2c8a5690e/index.d.ts#L1297) Logger target β€” defaults to the emitting Rust module path (e.g. `"simulang_rs::windows::app"`). Used by the filter spec to gate logs per module. # Simulang with Claude Code Source: https://docs.simular.ai/simulang/simulang-claude-code Automate your Mac from Claude Code with the /simulang skillβ€”install, prompts, and desktop tips. # Using Simulang with Claude Code Simulang is a **Claude Code skill** for **desktop automation** on macOS. You describe the task in natural language (open apps, click controls, type text, scroll, capture screenshots, inspect the accessibility tree); Claude looks up the installed `simulang-js` API, writes a TypeScript script, and runs it with the Simulang CLIβ€”same building blocks as the [Simulang Primer](/simulang/simulang-primer). ## Setup 1. **Install simulang CLI globally:** ```bash theme={null} npm install -g @simular-ai/simulang ``` 2. **Install the Claude Code skill:** ```bash theme={null} simulang init-claude ``` 3. **(Optional) Enable the log viewer** for visual debugging: ```bash theme={null} npm install @simular-ai/simulang-log-viewer ``` Then tell Claude: `/simulang enable log view in all scripts` ## Usage Invoke the skill with `/simulang` followed by what you want to do: ``` /simulang open google and search for weather in sf /simulang take a screenshot of the current screen /simulang find all buttons on the screen using accessibility tree /simulang click on the submit button /simulang type "hello world" and press enter ``` Claude will: 1. Look up the simulang-js API docs for the installed version 2. Write a TypeScript script 3. Run it with `simulang run` 4. Show you screenshots or results ## Example Prompts | Prompt | What Claude Does | | --------------------------------------------- | ---------------------------------- | | `/simulang open safari and go to github.com` | Opens browser, navigates to URL | | `/simulang search for "Simular" on this page` | Presses Cmd+F, types search term | | `/simulang scroll down and take a screenshot` | Scrolls, captures screen | | `/simulang what's the version of simulang?` | Runs `simulang --version` | | `/simulang read the simulang-js API docs` | Reads `index.d.ts` and `CLAUDE.md` | ## Tips * **Be specific** β€” "click the blue Submit button" works better than "click submit" * **Ask for screenshots** β€” Claude can capture and view what's on screen * **Use grounding models** β€” For visual element finding, set `OPENROUTER_API_KEY` * **Enable log viewer** β€” Helps when the terminal is hidden behind automated apps ## Requirements * Node.js >= 22.18 * macOS: Grant Accessibility and Screen Recording permissions when prompted # Simulang Primer Source: https://docs.simular.ai/simulang/simulang-primer Hands-on tour of writing Simulang scripts β€” browser automation, forms, screenshots, and workflows. # The Simulang Primer A hands-on tour of writing scripts in **Simulang**. By the end you'll know how to drive a real browser, fill in a form, click through a UI, take screenshots, ground elements with a vision model, and compose larger workflows out of small reusable steps β€” all in plain TypeScript or JavaScript. This primer is meant to be read in order; each chapter builds on the one before it. The complete API reference for the underlying library is hosted at [simulang-js](https://docs.simular.ai/simulang-js/api/latest) β€” keep that open in another tab when you're ready to go deeper than what we cover here. Once a chapter clicks, the **[Simulang Recipes](https://github.com/simular-ai/simulang-recipes)** repo is the easiest way to see the same ideas applied end-to-end: every recipe is a small, runnable script you can clone, run, and adapt. *** ## Table of contents 1. [What is Simulang?](#1-what-is-simulang) 2. [Your first script](#2-your-first-script) 3. [Opening an app](#3-opening-an-app) 4. [Your first automation](#4-your-first-automation) 5. [The accessibility tree](#5-the-accessibility-tree) 6. [Acting on elements](#6-acting-on-elements) 7. [Finding the element you want](#7-finding-the-element-you-want) 8. [Waiting for the UI](#8-waiting-for-the-ui) 9. [When things don't work](#9-when-things-dont-work) 10. [A complete example](#10-a-complete-example) 11. [When accessibility isn't enough](#11-when-accessibility-isnt-enough) 12. [Files, env vars, and shelling out](#12-files-env-vars-and-shelling-out) 13. [Composing scripts](#13-composing-scripts) 14. [Common pitfalls](#14-common-pitfalls) 15. [Where to go next](#15-where-to-go-next) 16. [Simulang in Claude Code](#16-simulang-in-claude-code) *** ## 1. What is Simulang? **Simulang is a small command-line tool for running automation scripts against real desktop applications** β€” your default browser, your editor, a chat app, a native dialog, whatever happens to be running. A Simulang script is an ordinary ES module (a `.ts`, `.mts`, or `.mjs` file) that imports from `@simular-ai/simulang-js` and drives the OS through its accessibility APIs. If you've used Playwright or Puppeteer, the mental model will feel familiar: open a thing, find an element, interact with it, assert what happened. The differences: * Simulang isn't browser-only. The same APIs drive **native apps** β€” a messaging client to grab a 2FA code, a finder window, a desktop installer. * There's **no headless mode**. You're automating the actual UI a person would see, on the actual screen. * Element discovery uses the OS-level **accessibility tree**, not CSS selectors. That's how the same script can find a button in Chrome and a menu item in a native macOS app. This primer assumes you have `simulang` installed and a desktop you can run scripts against β€” see the [simulang-cli README](https://github.com/simular-ai/simulang-cli) for install, authentication, and version-pinning details. From here on, we focus on writing and running workflows. *** ## 2. Your first script Create `hello.ts`: ```ts theme={null} // hello.ts const { platform, version } = process console.log(`Hello from simulang on ${platform}, Node ${version}.`) ``` Run it: ``` $ simulang run hello.ts Hello from simulang on darwin, Node v22.18.0. ``` That's it β€” no boilerplate, no `async function main()` wrapper. A Simulang script is just an ES module, and the top of the file *is* the entry point. Top-level `await` works, dynamic imports work, and the full Node standard library is available. ```ts theme={null} // hello-async.ts // Top-level await is fine. await new Promise((r) => setTimeout(r, 50)) console.log('half a frame later…') // And so is dynamic import β€” useful for branching by platform. const fs = await import('node:fs/promises') console.log('cwd =', await fs.realpath(process.cwd())) ``` If you've worked with newer Node tooling this will feel completely ordinary. That's the point. **Recap.** A Simulang script is just an ES module. Save a `.ts`, `.mts`, or `.mjs` file. Run it with `simulang run`. Use `process.env`, `process.exit`, and anything else you'd use in a normal Node script. *** ## 3. Opening an app The `@simular-ai/simulang-js` package gives you everything else. Let's open `example.com` in the default browser: ```ts theme={null} // open-example.ts import { App, FocusPolicy, Visibility } from '@simular-ai/simulang-js' const instance = App.defaultBrowser().open( 'https://example.com', FocusPolicy.Steal, // β‘  bring the browser to the front Visibility.Show, // β‘‘ don't try to hide it true, // β‘’ block briefly for the page to start ) console.log('opened:', instance.pid) ``` Three things to call out: 1. **`FocusPolicy`** is `Steal` or `DoNotSteal`. *"Steal"* asks the OS to bring the app to the front; *"DoNotSteal"* asks it not to. The word "ask" is doing real work in that sentence β€” see the pitfalls chapter. 2. **`Visibility`** is `Show` or `Hidden`. Same caveat: it's a request, not a guarantee, and Chromium-based apps in particular ignore `Hidden`. 3. **`waitForLoadComplete`** (the trailing boolean) blocks for a short, fixed delay so the app or URL has a chance to become responsive before `open()` returns. It's a sleep, not a full network wait β€” you still need to give the page time to render before reaching for the DOM. The call returns an **`Instance`** β€” a handle to the running app: ```ts theme={null} instance.pid // process ID instance.isFocused() // boolean instance.focus() // bring it forward instance.hide() // minimise instance.isAccessible() // does the OS expose this app's accessibility tree? instance.enableAccessibility() ``` If you want to launch a *specific* app (not the system default), use `App.exactName()`: ```ts theme={null} App.exactName('Google Chrome').open( null, // no URL β€” just raise the app FocusPolicy.Steal, Visibility.Show, false, ) ``` `open(null, …)` is the canonical way to **raise an already-running app** to the foreground without changing its state. *** ## 4. Your first automation Time to make something happen. Save this as `wikipedia-stats.ts`: ```ts theme={null} // wikipedia-stats.ts β€” run with: simulang run wikipedia-stats.ts import { AccessibilityTree, App, AriaRole, FocusPolicy, Visibility, type AccessibilityNodeJs, } from '@simular-ai/simulang-js' const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)) function flattenDFS( node: AccessibilityNodeJs, out: AccessibilityNodeJs[] = [], ): AccessibilityNodeJs[] { out.push(node) for (const child of node.children) flattenDFS(child, out) return out } const instance = App.defaultBrowser().open( 'https://en.wikipedia.org', FocusPolicy.Steal, Visibility.Show, true, ) await sleep(2500) if (!instance.isAccessible()) instance.enableAccessibility() const tree = AccessibilityTree.fromPid(instance.pid) const link = flattenDFS(tree.snapshot(true)).find( (n) => n.role === AriaRole.Link && /special:statistics/i.test(n.description) && n.refId != null, ) if (!link) throw new Error('Could not find the Statistics link.') tree.activate(link.refId) console.log('Opened the Wikipedia statistics page.') ``` Run it. Wikipedia opens, Simulang walks the page's accessibility tree, finds the Statistics link, clicks it, and your browser jumps to Wikipedia's `Special:Statistics` page. **Why `n.description` and not `n.name`?** Web AX on macOS commonly exposes link text in the `description` field with `name` left empty. Other platforms differ β€” that's exactly the kind of cross-platform variability chapter 7 addresses with a `labelOf` helper that checks every field a label might live in. **macOS first-run prompt.** The first time a Simulang script touches another app, the OS will prompt you to grant accessibility permission to the terminal you ran it from (System Settings β†’ Privacy & Security β†’ Accessibility). Grant it once and you're set. That's the whole Simulang loop in twenty-odd lines. The shape is the same for every script you'll write β€” from this demo to a multi-step purchase flow: 1. **Open or attach to an app** β€” `App.defaultBrowser().open` (here), or `AccessibilityTree.fromPid` to drive something already running. 2. **Snapshot the accessibility tree** β€” `tree.snapshot(true)` returns the visible UI as a tree of nodes. 3. **Walk the tree** to find the node you want β€” any standard array or object operation works, since the snapshot is plain data. 4. **Act on its `refId`** β€” `tree.activate(refId)` for clicks, `tree.setValue(refId, text)` for typing, and a handful of others. Don't worry about every line yet β€” the next few chapters break it down. The takeaway is that you've now seen the four moves that make up every Simulang script. **A note on TypeScript.** This primer uses `.ts` so we can show type annotations where they're informative β€” `.mjs` works just as well. *** ## 5. The accessibility tree You just used the accessibility tree without an introduction. Let's back up and look at what it is. The **accessibility tree** is a snapshot of every visible widget in a window β€” the same data screen readers use to read a UI aloud. Every OS exposes one, and `@simular-ai/simulang-js` gives you a uniform Node API over it. ```ts theme={null} import { AccessibilityTree } from '@simular-ai/simulang-js' // Bind to the foreground window of whichever app is in front right now. const tree = AccessibilityTree.fromForeground() console.log('Bound to window:', tree.windowTitle) ``` You can also bind to a specific window by process ID β€” handy when you just opened the app yourself and have an `Instance.pid` (chapter 4 used this form): ```ts theme={null} const tree = AccessibilityTree.fromPid(instance.pid) ``` Once you've got a tree, take a snapshot: ```ts theme={null} const root = tree.snapshot(true) // true = visible-only; almost always what you want ``` The shape of every node looks like this: ```ts theme={null} interface AccessibilityNodeJs { role: AriaRole // numeric enum: Button = 7, Link = 32, ... name: string // accessible name value: string // current value (for inputs) description: string // platform-specific extra helpText: string // tooltip-style hint refId?: number // opaque handle for interactions (more below) children: AccessibilityNodeJs[] boundingBox: { x, y, width, height, ... } } ``` You walk this tree like any other object graph: ```ts theme={null} function flattenDFS(node, out = []) { out.push(node) for (const child of node.children) flattenDFS(child, out) return out } for (const node of flattenDFS(root).slice(0, 10)) { console.log(node.role, JSON.stringify(node.name).slice(0, 60)) } ``` **The most important property is `refId`.** It's an opaque integer that identifies a node *for this snapshot only*. You pass it to interaction methods like `tree.activate(refId)` to click. Two crucial properties: * **A `refId` is valid only as long as the snapshot that produced it.** Take a new snapshot, and the old refIds are dead. We'll see how to cope with that in chapter 8. * **A node only has a `refId` when the OS exposed one.** Some structural wrappers (groups, panels) don't have refIds; you can still see them in the tree, but you can't click them. Always check `refId != null` before acting. The roles are an enum called `AriaRole`. The common ones: ```ts theme={null} import { AriaRole } from '@simular-ai/simulang-js' AriaRole.Button // 7 AriaRole.Checkbox // 10 AriaRole.Dialog // 18 AriaRole.Document // 20 β€” the root of a web page AriaRole.Heading // 29 AriaRole.Img // 30 AriaRole.Link // 32 AriaRole.MenuItem // 43 AriaRole.Radio // 54 AriaRole.Tab // 72 AriaRole.Textbox // 78 ``` **Heads up.** `AriaRole` is a numeric enum. The TypeScript reverse-mapping trick β€” `AriaRole[someNode.role]` β€” does **not** work for numeric NAPI enums. Use the exported helper instead: ```ts theme={null} import { ariaRoleToString } from '@simular-ai/simulang-js' ariaRoleToString(node.role) // "button" ``` **Recap.** Bind to a window β†’ take a snapshot β†’ walk the tree to find the node you want β†’ act on its `refId`. The rest of this primer is elaborations on that loop. *** ## 6. Acting on elements Once you have a `refId`, the `AccessibilityTree` object exposes a small family of action methods: ```ts theme={null} tree.activate(refId) // "click" β€” works for buttons, links, menuitems tree.setValue(refId, text) // type into a textbox / combobox tree.toggle(refId) // flip a checkbox or switch tree.select(refId) // choose a tab, radio button, or list item tree.expandCollapse(refId) // open/close a dropdown or tree item tree.scrollIntoView(refId) // bring the element on-screen tree.focusElement(refId) // focus (also raises the window) tree.getBounds(refId) // current screen coordinates ``` In practice you'll spend most of your time with **`activate`** and **`setValue`**. The rest are special-purpose helpers for cases where a plain click doesn't do the right thing. **Sync, not async.** Every action method on `AccessibilityTree` is synchronous β€” they don't return Promises, and you don't `await` them. The `await` you saw in chapter 4 was for `sleep`, not for `tree.activate`. `tree.snapshot()` is also synchronous. The only things you `await` in a typical script are sleeps, polling helpers like `withSnapshot` (chapter 8), and Node stdlib promises (fetch, `node:fs/promises`). You already saw `activate` in chapter 4. Filling a form looks the same β€” find the input, set its value, find the submit button, activate it: ```ts theme={null} const nodes = flattenDFS(tree.snapshot(true)) const searchBox = nodes.find( (n) => n.role === AriaRole.Textbox && /search/i.test(n.name) && n.refId != null, ) const searchBtn = nodes.find( (n) => n.role === AriaRole.Button && /^search$/i.test(n.name) && n.refId != null, ) if (!searchBox || !searchBtn) throw new Error('search controls not found') tree.setValue(searchBox.refId, 'simulang') // β‘  type into the box tree.activate(searchBtn.refId) // β‘‘ click submit ``` Two details worth noticing β€” they apply to every action method: 1. The predicate checks **`n.refId != null`**. Without that, you might match a structural wrapper that has the right name but no way to be acted on. 2. Both `setValue` and `activate` use `refId`s from the *same* snapshot. As long as no new snapshot has happened between them, the refs stay valid. After any navigation or UI mutation, you'll need a fresh snapshot β€” chapter 8 shows the pattern. *** ## 7. Finding the element you want Real UIs make element discovery harder than "find by name." A few practical patterns we use again and again. **A note on the helpers in this chapter.** `labelOf`, `stripPUA`, `flattenDFS`, `pageNodes` below β€” and `withSnapshot` in the next chapter β€” are **not** exported from `@simular-ai/simulang-js`. They're a handful of lines each, and copying them into each script is faster than reaching for a dependency. The upside of script-local helpers is that you can tweak them when a project needs something different (a `labelOf` that includes `automationId`, a `pageNodes` scoped to a specific app). If you find yourself maintaining a project-wide variant, factor it into a local `lib/` directory and import it normally. ### 7.1 The label can live in any of four fields Different platforms put a control's accessible text in different places: * Native macOS apps usually put it in `name`. * Text inputs put the *current value* in `value` (not `name`). * Web AX on macOS often puts link text in `description`. * Tooltips show up in `helpText`. A single label-helper covers all four: ```ts theme={null} const labelOf = (n) => [n.name, n.value, n.description, n.helpText].filter(Boolean).join(' ').trim() ``` Now `labelOf(node)` is the answer to "what would a screen reader say about this element?", regardless of which field the OS chose. ### 7.2 Strip Private-Use-Area glyphs Web pages frequently put icon-font glyphs (Font Awesome, Material Icons) into link labels. These come through as characters in Unicode's Private Use Area (`U+E000`–`U+F8FF`), and they break anchored regexes: ```ts theme={null} // node.name might be " Logout" /^logout$/i.test(node.name) // false ☹ ``` Strip them: ```ts theme={null} const stripPUA = (s) => s.replace(/[-]/g, '').replace(/\s+/g, ' ').trim() const labelOf = (n) => stripPUA([n.name, n.value, n.description, n.helpText].filter(Boolean).join(' ')) ``` ### 7.3 Scope to the page, not the chrome A browser snapshot includes the URL bar, tab strip, bookmarks bar, dev-tools panes β€” none of which you usually want when you're looking for an "Add to cart" button. The convention is to flatten only the **last `AriaRole.Document` subtree**, which is the active tab's web content: ```ts theme={null} function pageNodes(root) { const all = flattenDFS(root) const docs = all.filter((n) => n.role === AriaRole.Document) if (!docs.length) return all // not a browser β€” full tree return flattenDFS(docs[docs.length - 1]) // last = active tab } ``` Then use `pageNodes(root)` instead of `flattenDFS(root)` when you're hunting for something inside the page. ### 7.4 Use the built-in search when it fits `AccessibilityTree` also exposes a search method that mirrors the common case: ```ts theme={null} import { TraversalOrder } from '@simular-ai/simulang-js' const hits = tree.find( TraversalOrder.DepthFirst, AriaRole.Button, // role filter (optional) 'Submit', // name contains (optional) true, // visibleOnly 1, // maxResults ) if (hits[0]) tree.activate(hits[0].refId) ``` Use the built-in `find` for "fast path, one role, one name match." Drop back to manual DFS when you need spatial reasoning β€” for example, "the second textbox that appears between the heading 'Sign in' and the button 'Continue'." *** ## 8. Waiting for the UI Pages mutate. Modals appear. The element you want shows up half a second after a click. Because `refId`s invalidate every time you call `snapshot()`, the safe pattern is a **polling loop that re-snapshots each tick and looks for what you want**: ```ts theme={null} async function withSnapshot( tree, predicate, { timeoutMs = 8000, intervalMs = 250, label = 'node' } = {}, ) { const deadline = Date.now() + timeoutMs while (Date.now() < deadline) { const root = tree.snapshot(true) // β‘  fresh refIds every tick const hit = predicate(flattenDFS(root)) // β‘‘ caller decides "found" if (hit) return hit // β‘’ first match wins await sleep(intervalMs) } throw new Error(`Timed out waiting for ${label}`) } ``` Used at the call site: ```ts theme={null} const link = await withSnapshot( tree, (nodes) => nodes.find( (n) => n.role === AriaRole.Link && /^logout$/i.test(labelOf(n)) && n.refId != null, ), { label: '"Logout" link' }, ) tree.activate(link.refId) ``` Three reasons this pattern shows up in every nontrivial script: 1. The element might not be there yet β€” page is still loading, animation is mid-flight, modal hasn't opened. 2. The element might be there but its `refId` is from a now-stale snapshot. Polling re-issues the snapshot for you. 3. The named `label` gives you a useful error message when the wait genuinely times out: *"Timed out waiting for the Allow button in the blocked-download panel"* is much nicer to read at 3am than *"Timed out waiting for node."* A predicate doesn't have to return a single node. When you need several pieces of state to all be visible at once, return a structured object: ```ts theme={null} const { emailField, passField, loginBtn } = await withSnapshot( tree, (nodes) => { const headingIdx = nodes.findIndex((n) => /sign in/i.test(labelOf(n))) if (headingIdx === -1) return null const btnIdx = nodes.findIndex( (n, i) => i > headingIdx && n.role === AriaRole.Button && /sign in/i.test(labelOf(n)), ) if (btnIdx === -1) return null const inputs = nodes .slice(headingIdx, btnIdx) .filter((n) => n.role === AriaRole.Textbox && n.refId != null) if (inputs.length < 2) return null return { emailField: inputs[0], passField: inputs[1], loginBtn: nodes[btnIdx] } }, { label: 'sign-in form (email + password + button)' }, ) ``` This is also how you handle login forms whose inputs have no accessible label at all: locate them **positionally**, between two well-labelled landmarks. *** ## 9. When things don't work Sooner or later you'll get `Timed out waiting for "Continue" button`, or your `find` will silently return `undefined`. Here's the troubleshooting playbook. ### 9.1 Print the tree The fastest way to debug a missing element is to dump what *is* there: ```ts theme={null} import { ariaRoleToString } from '@simular-ai/simulang-js' const lines = flattenDFS(tree.snapshot(true)) .filter((n) => n.refId != null && labelOf(n)) .map((n) => `${ariaRoleToString(n.role).padEnd(12)} ${JSON.stringify(labelOf(n)).slice(0, 60)}`) console.log(lines.join('\n')) ``` Drop that wherever your script is stuck. It prints every actionable element on the page with its role and accessible label. Two outcomes: * **The element isn't in the list.** The page hasn't rendered it yet. Sleep longer, or β€” better β€” wrap the lookup in `withSnapshot` so it polls. * **It is in the list, but your predicate isn't matching.** Almost always: the label is in `description` or `value` instead of `name`, or there's a stray icon-font glyph you didn't strip. See chapter 7. ### 9.2 Common root causes A handful of issues account for most "where did my element go" problems: * **The label is in `description`, `value`, or `helpText`, not `name`.** Use `labelOf` (chapter 7) instead of `node.name` directly. * **The element has no `refId`.** Structural wrappers (groups, panes) often share a name with their actionable children but don't get a refId of their own. Always filter with `n.refId != null` in your predicate. * **You're looking inside the wrong subtree.** Browser chrome (URL bar, bookmarks bar) lives at the top of the snapshot; the active page is inside the last `AriaRole.Document`. Use `pageNodes` (chapter 7) when you only want page content. * **The page renders after your snapshot.** Wrap the find in `withSnapshot` rather than bumping a brittle `sleep`. * **The element appears, then disappears.** SPAs sometimes re-mount nodes mid-update. `withSnapshot` retries on a fresh snapshot each tick; bare `find` doesn't. * **You're bound to the wrong window.** `AccessibilityTree.fromForeground()` binds to whichever app is frontmost *at the moment of the call*. If a notification stole focus during your `sleep`, you'll get its tree instead. `fromPid(instance.pid)` is the safer choice when you have a pid. ### 9.3 Iterate in the REPL When you're stuck on a predicate, `simulang run -i` is much faster than editing-and-rerunning the whole script. Bring the target app to the front first, then: ``` $ simulang run -i > const tree = AccessibilityTree.fromForeground() > const root = tree.snapshot(true) > flattenDFS(root).filter((n) => n.role === AriaRole.Button).map((n) => n.name) [ 'Sign in', 'Cancel', '' ] ``` `fromForeground()` binds to whatever's active at the moment of the call β€” that's why the app needs to be focused before you run it. *** ## 10. A complete example Let's tie everything together. The script below opens `automationexercise.com` (a public test site), confirms we're logged out, signs in with credentials from environment variables, and signs out again. We verify each state transition through the accessibility tree. ```ts theme={null} // login-and-out.ts import { AccessibilityTree, App, AriaRole, FocusPolicy, Visibility, } from '@simular-ai/simulang-js' const email = process.env.SITE_EMAIL const password = process.env.SITE_PASSWORD if (!email || !password) { console.error('Set SITE_EMAIL and SITE_PASSWORD before running.') process.exit(1) } const sleep = (ms) => new Promise((r) => setTimeout(r, ms)) const stripPUA = (s) => s.replace(/[-]/g, '').replace(/\s+/g, ' ').trim() const labelOf = (n) => stripPUA([n.name, n.value, n.description, n.helpText].filter(Boolean).join(' ')) function flattenDFS(node, out = []) { out.push(node); for (const c of node.children) flattenDFS(c, out); return out } async function withSnapshot(tree, predicate, opts = {}) { const { timeoutMs = 8000, intervalMs = 250, label = 'node' } = opts const deadline = Date.now() + timeoutMs while (Date.now() < deadline) { const root = tree.snapshot(true) const hit = predicate(flattenDFS(root)) if (hit) return hit await sleep(intervalMs) } throw new Error(`Timed out waiting for ${label}`) } const isLink = (n, re) => n.role === AriaRole.Link && re.test(labelOf(n)) && n.refId != null const findLink = (nodes, re) => nodes.find((n) => isLink(n, re)) const SIGNUP_LOGIN = /^signup \/ login$/i const LOGOUT = /^logout$/i try { // 1. Open the site. const instance = App.defaultBrowser().open( 'https://automationexercise.com', FocusPolicy.Steal, Visibility.Show, true, ) await sleep(2500) if (!instance.isAccessible()) instance.enableAccessibility() const tree = AccessibilityTree.fromPid(instance.pid) // 2. Make sure we're logged out (self-heal from stale sessions). const navState = await withSnapshot( tree, (nodes) => { const logout = findLink(nodes, LOGOUT) if (logout) return { kind: 'logged-in', logout } if (findLink(nodes, SIGNUP_LOGIN)) return { kind: 'logged-out' } return null }, { label: 'nav with Signup/Login or Logout' }, ) if (navState.kind === 'logged-in') { tree.activate(navState.logout.refId) await withSnapshot( tree, (nodes) => findLink(nodes, SIGNUP_LOGIN) && !nodes.some((n) => isLink(n, LOGOUT)), { label: 'logged-out state' }, ) } // 3. Click "Signup / Login". const loginLink = await withSnapshot(tree, (nodes) => findLink(nodes, SIGNUP_LOGIN), { label: '"Signup / Login" link', }) tree.activate(loginLink.refId) // 4. Find the login form positionally and fill it. const { emailField, passField, loginBtn } = await withSnapshot( tree, (nodes) => { const hIdx = nodes.findIndex((n) => /^login to your account$/i.test(labelOf(n))) if (hIdx === -1) return null const btnIdx = nodes.findIndex( (n, i) => i > hIdx && n.role === AriaRole.Button && /^login$/i.test(labelOf(n)), ) if (btnIdx === -1) return null const inputs = nodes.slice(hIdx, btnIdx).filter( (n) => n.role === AriaRole.Textbox && n.refId != null, ) if (inputs.length < 2) return null return { emailField: inputs[0], passField: inputs[1], loginBtn: nodes[btnIdx] } }, { label: 'login form' }, ) tree.setValue(emailField.refId, email) tree.setValue(passField.refId, password) tree.activate(loginBtn.refId) // 5. Confirm login by waiting for the Logout link, then click it. const logoutLink = await withSnapshot(tree, (nodes) => findLink(nodes, LOGOUT), { label: 'Logout link', timeoutMs: 10000, }) tree.activate(logoutLink.refId) // 6. Confirm logout. await withSnapshot( tree, (nodes) => findLink(nodes, SIGNUP_LOGIN) && !nodes.some((n) => isLink(n, LOGOUT)), { label: 'logged-out confirmation' }, ) console.log('done.') } catch (error) { console.error('Failed:', error instanceof Error ? error.message : error) process.exit(1) } ``` Most real scripts are some variant of this shape: * **Imports at the top**, secrets from `process.env`. * **A handful of small helpers** (`sleep`, `labelOf`, `flattenDFS`, `withSnapshot`) β€” the chapter-7 note about script-local helpers applies here. * **One big `try`/`catch`** with `process.exit(1)` on failure. * **Numbered phases**, each one a `withSnapshot` that names what it's waiting for. The names double as breadcrumbs in the logs. *** ## 11. When accessibility isn't enough The accessibility tree is the right tool nine times out of ten, but not always. Two escape hatches: ### 11.1 Hardware mouse and keyboard When a control has no `refId` β€” a canvas, an embedded video player, an OS-level dialog the app doesn't expose β€” drop to real coordinates and key events: ```ts theme={null} import { MouseController, KeyboardController, Button, Direction, Coordinate, Key, } from '@simular-ai/simulang-js' const mouse = new MouseController() mouse.moveMouse(640, 360, Coordinate.Abs) // absolute screen pixels mouse.button(Button.Left, Direction.Click) // press + release const kb = new KeyboardController() kb.text('hello world') // types via the OS input layer kb.key(Key.Enter) // a single named key ``` `Coordinate.Abs` is absolute pixels; `Coordinate.Rel` is movement *relative to the current cursor position*. For drag-and-drop, send `Direction.Press`, move, then `Direction.Release`. ### 11.2 Vision grounding When you can *see* the element but neither the OS nor your regex can find it, take a screenshot and ask a vision model where it is: ```ts theme={null} import { Screen, screenshotFull, GroundingModel } from '@simular-ai/simulang-js' const shot = screenshotFull(true, Screen.mainScreen()) // hide the cursor const [x, y] = shot.ground(GroundingModel.default(), 'the blue Continue button') mouse.moveMouse(x, y, Coordinate.Abs) mouse.button(Button.Left, Direction.Click) ``` `shot.ground(model, query)` returns absolute screen coordinates for whatever the model thinks best matches your natural-language query. A few practical notes: * Pass `true` to `screenshotFull` to hide the cursor β€” otherwise the model may describe the cursor as part of the UI. * Grounding is **network-bound**: it needs `OPENROUTER_API_KEY` set. * Vision grounding is your last resort, not your first move. It's slower, costs money, and is less reliable than the accessibility tree. Use it for the 1% of cases where nothing else works. *** ## 12. Files, env vars, and shelling out There are no Simulang-specific I/O wrappers. Use Node's standard library directly: ```ts theme={null} import { readdirSync, readFileSync, writeFileSync, renameSync, statSync, existsSync } from 'node:fs' import { spawn, spawnSync } from 'node:child_process' import { join, dirname } from 'node:path' import { fileURLToPath } from 'node:url' // Resolve "the directory of this script." const HERE = dirname(fileURLToPath(import.meta.url)) // Plain I/O. writeFileSync(join(HERE, 'out.txt'), 'hello\n') const text = readFileSync(join(HERE, 'out.txt'), 'utf8') // Shell out β€” captured output. const result = spawnSync('python3', ['transform.py', 'in.csv'], { encoding: 'utf8' }) if (result.status !== 0) throw new Error(result.stderr) // Fire-and-forget β€” open a file with the OS default app. spawn('open', [join(HERE, 'out.txt')], { detached: true, stdio: 'ignore' }).unref() ``` `import.meta.url` + `fileURLToPath` is the ES-module equivalent of the CommonJS `__dirname`. Use it any time you need to resolve a path relative to the script itself. The `@simular-ai/simulang-js` package also ships convenience classes β€” `File`, `Directory`, `Clipboard`, `System` β€” when you want cross- platform helpers (an OS clipboard read, a temp directory with an explicit lifecycle). They're worth using for clipboard and audio work; for plain file reads and writes, staying in `node:fs` keeps the concept count low. *** ## 13. Composing scripts As workflows grow, you'll want to split them up. There are two natural ways. ### 13.1 Import helpers from sibling modules The simplest: extract reusable functions into their own files and import them. ```ts theme={null} // flow/login.mjs export async function login(tree, { email, password }) { // … positional find + setValue + activate, as in chapter 10 … } ``` ```ts theme={null} // flow/checkout.mjs export async function placeOrder(tree, item) { // … } ``` ```ts theme={null} // run.mjs import { App, FocusPolicy, Visibility, AccessibilityTree } from '@simular-ai/simulang-js' import { login } from './flow/login.mjs' import { placeOrder } from './flow/checkout.mjs' App.defaultBrowser().open('https://example.com', FocusPolicy.Steal, Visibility.Show, true) const tree = AccessibilityTree.fromForeground() await login(tree, { email: process.env.SITE_EMAIL, password: process.env.SITE_PASSWORD }) await placeOrder(tree, 'blue-shirt') ``` This is just ES modules β€” there's nothing Simulang-specific to learn. Pass shared resources (the `tree`, the `instance`) as arguments rather than reaching for module-level singletons. ### 13.2 Run other scripts as subprocesses When you want full isolation between phases β€” fresh process, fresh state, no shared imports β€” orchestrate from a parent script: ```ts theme={null} // orchestrator.mjs import { spawnSync } from 'node:child_process' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' const HERE = dirname(fileURLToPath(import.meta.url)) function runStep(label, script) { console.log(`\n===== ${label} =====`) const result = spawnSync('simulang', ['run', join(HERE, script)], { stdio: 'inherit', // stream the child's logs live env: process.env, // pass env vars through (SITE_EMAIL, OPENROUTER_API_KEY, …) }) if (result.status !== 0) { console.error(`"${label}" failed with exit ${result.status}.`) process.exit(result.status ?? 1) } } runStep('Sign in', 'sign-in.ts') runStep('Place order', 'place-order.ts') runStep('Download receipt', 'download-receipt.ts') ``` The big win: each step is **independently runnable**. If `place-order.ts` fails, you can iterate on it directly without re-running sign-in every time. *** ## 14. Common pitfalls A short list of things that bite first-time users (and second- and third-time users, honestly). ```ts theme={null} // β‘  refIds are tied to one snapshot. Don't cache them. const btn = flattenDFS(tree.snapshot(true)).find(...) await sleep(2000) // ← the page may have re-rendered tree.activate(btn.refId) // ⚠ stale refId // βœ“ Re-snapshot inside withSnapshot and act on a fresh ref. ``` ```ts theme={null} // β‘‘ AriaRole is a numeric enum. AriaRole[role] does NOT give a string. console.log(AriaRole[node.role]) // ⚠ undefined console.log(ariaRoleToString(node.role)) // βœ“ "button" ``` ```ts theme={null} // β‘’ FocusPolicy and Visibility are advisory. App.exactName('Google Chrome').open(null, FocusPolicy.DoNotSteal, Visibility.Hidden, false) // ⚠ Chromium / Electron apps and macOS Notes ignore these flags. The // app pops to the foreground and stays visible regardless. // βœ“ If you need certainty the app is focused, check and force it: if (!instance.isFocused()) instance.focus() // βœ“ If you need it hidden, call .hide() after the launch settles: await sleep(500) instance.hide() ``` ```ts theme={null} // β‘£ The accessible label can live in any of four fields. node.name === 'Sign in' // ⚠ might be in description on web AX labelOf(node) === 'Sign in' // βœ“ uses name|value|description|helpText ``` ```ts theme={null} // β‘€ Browser chrome contaminates snapshots. nodes.find((n) => /save/i.test(labelOf(n))) // ⚠ might match the URL bar pageNodes(root).find(/* … */) // βœ“ scope to the active tab ``` ```ts theme={null} // β‘₯ There is no built-in sleep / wait. Roll your own. const sleep = (ms) => new Promise((r) => setTimeout(r, ms)) ``` ```ts theme={null} // ⑦ Top-level errors print ugly stack traces. Wrap and exit. try { // … your script … } catch (e) { console.error('Failed:', e instanceof Error ? e.message : e) process.exit(1) } ``` One more worth mentioning that doesn't fit a one-liner: * **Temp directories don't auto-clean.** If you use `Directory.temp()`, wrap the work in `try { … } finally { dir.remove() }`. *** ## 15. Where to go next You now know enough to write real Simulang scripts. From here: * **Clone the [Simulang Recipes](https://github.com/simular-ai/simulang-recipes) repo.** It's a growing collection of community-built automations β€” a Wordle solver, a 2048 bot, a Calendar-to-Docs digest, a daily news digest into Apple Notes, a TikTok-to-Slack forwarder, and more. Each recipe is a small, self-contained script with its own README; pick one close to what you want to build, run it, then read the source. Contributions welcome. * **Read `index.d.ts`** in the resolved `@simular-ai/simulang-js` install. It's the typed surface of the library β€” roughly 1500 lines, organised by class. Source of truth for signatures and enums, and the entry point to everything we didn't cover here (audio capture, speech-to-text, screen recording). * **Read the library's `CLAUDE.md`** next to `index.d.ts`. It covers idioms, lifecycle preconditions, and platform quirks β€” things types can't express. * **Browse the example scripts** in `examples/` inside the install. They're the best place to see larger patterns: a full purchase flow, file downloads with rename, screenshot-and-ground, module composition. * **Build your reflexes at the REPL.** When you're not sure how an API behaves, `simulang run -i` is faster than scripting it. Snapshots are cheap; experiment. Welcome to Simulang. Have fun automating things that used to need a human in the chair. *** ## 16. Simulang in Claude Code If you use **Claude Code** in the editor, you can drive the same desktop APIs without hand-writing every script: install the skill and use `/simulang` so Claude generates and runs automation for you. See **[Simulang with Claude Code](/simulang/simulang-claude-code)** for setup (`simulang init-claude`), example prompts, permissions, and tips. # Simulang v0 examples Source: https://docs.simular.ai/simular-pro/examples Example prompts and Simulang v0 snippets for Simular Pro β€” the in-app v0 action vocabulary. The best way to master Simular Pro is to learn from the example instructions (prompts) and corresponding **Simulang v0** code on this page. Just run the instructions on your Simular Pro to reproduce similar **Simulang v0** code, or copy the snippets on this page and execute them in the app. **Simulang v0 only β€” not the latest Simulang.** These examples apply **only** to **Simulang v0** embedded in **Simular Pro**. They do **not** match the current standalone Simulang CLI, `simulang-js`, or other **newer Simulang** surfaces; syntax and actions can differ. Use this page with the [Simulang v0 API reference](/simular-pro/simulang). For the latest scripting model, see the [Simulang Primer](/simulang/simulang-primer) and [Simulang with Claude Code](/simulang/simulang-claude-code). Find out how to: * [Read structured information](/simular-pro/examples#reading-structured-information) * [Repeat a task on multiple objects](/simular-pro/examples#repeating-a-task-on-multiple-objects-on-a-page) * [Write structured output](/simular-pro/examples#structured-information-output) * [Locate an element precisely](/simular-pro/examples#clicking-on-ui-elements) You can always refer to the [Simulang v0 API documentation](/simular-pro/simulang) if you need a refresher on each Simulang v0 action. Most of the **Simulang v0** code on this page was generated in one shot from the instructions. Since there may be differences in individual machine configurations (e.g. browser settings), we recommend that you double check the Simulang v0 snippets before executing. If Simular Pro did not click on an element you intended, try these [various methods](#clicking-on-ui-elements) for element localization. ## Reading structured information Many workflows start with extracting information from an application or webpage. Moreover, the extracted information often needs to be represented in a particular structure. For example: * A house on sale has the following fields: address, square footage, number of beds and baths, etc. * An email has these fields: sender address, time sent, title, etc. This section shows you how to instruct Simular Pro to extract information from diverse sources into structured forms. The resulting information will be ready for downstream workflow steps, such as [iterating a subtask over multiple elements](#repeating-a-task-on-multiple-objects-on-a-page) or [writing structured outputs to files](#structured-information-output). ### Community and communication applications: Extracting channel names on a desktop community app ```text Instruction theme={null} Open Discord Get the page content and extract the top 10 server names visible in the left sidebar. Do not include direct messages. ``` ```javascript Simulang v0 theme={null} function main() { // Open Discord open({app: "Discord"}); let servers = []; // Get page content and analyze servers var content = pageContent(); // Extract list of servers from the sidebar var serverList = ask({ prompt: "List the top 10 Discord server names visible in the left sidebar. Do not include the direct messages. Return as JSON array. Do not say anything else.", context: content }); servers = JSON.parse(serverList); return servers; } ``` ### Shopping: Get all store locations of a grocery chain ```text Instruction theme={null} Go to Wegmans stores webpage. Get all the locaitons and print them out. ``` ```javascript Simulang v0 theme={null} function main() { // Open Wegmans stores webpage open({url: "https://www.wegmans.com/stores"}); wait({waitTime: 2}); // Get page content and extract all locations var content = pageContent(); var locationsResponse = ask({ prompt: "Extract all store locations from this page. Return a JSON array of location names (cities/towns where Wegmans stores are located). Do not say or explain anything else, just return the requested data.", context: content }); var locations = JSON.parse(locationsResponse); // Print out all locations console.log("Wegmans Store Locations:"); for (let i = 0; i < locations.length; i++) { console.log(`${i + 1}. ${locations[i]}`); } return {status: "completed", totalLocations: locations.length, locations: locations}; } ``` ### Social media URL scraping: Get a company's social media URLs ```text Instruction theme={null} Go to simular.ai Get all of their social media URLs and print them out ``` ```javascript Simulang v0 theme={null} function main() { // Go to simular.ai open({url: "https://simular.ai"}); wait({waitTime: 3}); // Get page content const content = pageContent(); // Ask for social media URLs with explicit JSON format request const result = ask({ prompt: "Find all social media URLs on this page (Twitter, LinkedIn, YouTube, Facebook, Instagram, Discord, etc.). Return as a JSON array of URLs only. Do not say or explain anything else, just return the requested data.", context: content }); // Parse the JSON response const socialMediaUrls = JSON.parse(result); // Print out all social media URLs console.log("Social media URLs found on simular.ai:"); for (const url of socialMediaUrls) { console.log(url); } return {success: true, socialMediaUrls: socialMediaUrls}; } ``` ### News: Get all headlines from a news site ```text Instruction theme={null} Go to techcrunch, get all the news headlines, and print them out. ``` ```javascript Simulang v0 theme={null} function main() { // Open TechCrunch website open({url: "https://techcrunch.com"}); wait({waitTime: 3}); // Get page content const content = pageContent(); // Ask LLM to extract all news headlines const headlinesResponse = ask({ prompt: "Extract all news headlines from this TechCrunch page. Return only a JSON array of headline strings. Do not include any other text or explanation.", context: content }); // Parse the JSON response const headlines = JSON.parse(headlinesResponse); // Print out all headlines console.log("TechCrunch News Headlines:"); console.log("=========================="); for (let i = 0; i < headlines.length; i++) { console.log(`${i + 1}. ${headlines[i]}`); } return {success: true, headlinesCount: headlines.length}; } ``` ### Investing: Get an investment firm's list of portfolio companies ```text Instruction theme={null} Go to a16z's portfolio page and get all the features company names on the page. ``` ```javascript Simulang v0 theme={null} function main() { // Open Chrome and navigate to a16z portfolio page open({url: "https://a16z.com/portfolio"}); let allCompanies = new Set(); // Get current page content let content = pageContent(); // Extract visible company names let response = ask({ prompt: "This is the a16z portfolio page. List all visible featured portfolio company names on the page. Do not include a16z itself or any navigation elements. Return as JSON array of strings. Do not say or explain anything else, just return the requested data.", context: content }); allCompanies = JSON.parse(response); // Convert to sorted array and display results let sortedCompanies = Array.from(allCompanies).sort(); console.log(`Found ${sortedCompanies.length} featured companies on a16z's portfolio page:`); console.log(sortedCompanies.join("\n")); return { success: true, totalCompanies: sortedCompanies.length, companies: sortedCompanies }; } ``` ### Email management: Get the sender, date, and summary of the first unread email. ```text Instruction theme={null} Go to gmail.com Click the first unread email From the email content, get: sender email address, date, summary of topic ``` ```javascript Simulang v0 theme={null} function main() { // Go to Gmail open({url: "https://gmail.com"}); wait({waitTime: 3}); // Click the first unread email clickFirstUnreadEmail(); // Get email information let emailInfo = getEmailInfo(); // Output the results console.log(`Sender Email: ${emailInfo.senderEmail}`); console.log(`Date: ${emailInfo.date}`); console.log(`Summary: ${emailInfo.summary}`); return emailInfo; } //@ Click the first unread email function clickFirstUnreadEmail() { let content = pageContent(); let firstUnreadEmail = ask({ prompt: "Find the first unread email in the inbox and return its subject line or identifying text that can be clicked. Return only the clickable text, nothing else.", context: content }); click({concept: firstUnreadEmail}); wait({waitTime: 2}); } //@ Get email information including sender, date, and summary function getEmailInfo() { let content = pageContent(); let emailData = ask({ prompt: "From this email content, extract: 1) sender email address, 2) date of the email, 3) a brief summary of the topic/subject. Return as JSON with keys 'senderEmail', 'date', 'summary'. Do not say or explain anything else, just return the requested JSON data.", context: content }); return JSON.parse(emailData); } ``` ### Real estate: Get address, number of bedrooms and bathrooms, square footage, and price of homes in Palo Alto ```text Instruction theme={null} Go to redfin palo alto zip 14325 Get all the address, number of bed, number of bath, square feet, and price of the houses ``` ```javascript Simulang v0 theme={null} function main() { // Open Chrome and go to Redfin Palo Alto open({app: "Google Chrome"}); wait({waitTime: 2}); // Navigate to Redfin Palo Alto press({key: "l", cmd: true}); type({text: "redfin.com/city/14325/CA/Palo-Alto", withReturn: true}); wait({waitTime: 3}); // Get all house listings data let houseData = getHouseListings(); // Log the results console.log("House listings in Palo Alto:"); for (let i = 0; i < houseData.length; i++) { console.log(`House ${i + 1}:`); console.log(`Address: ${houseData[i].address}`); console.log(`Bedrooms: ${houseData[i].bedrooms}`); console.log(`Bathrooms: ${houseData[i].bathrooms}`); console.log(`Square Feet: ${houseData[i].squareFeet}`); console.log(`Price: ${houseData[i].price}`); console.log("---"); } return {status: "completed", houses: houseData}; } //@ Get all house listings with address, bedrooms, bathrooms, square feet, and price function getHouseListings() { // Get page content let content = pageContent(); // Ask LLM to extract house data let result = ask({ prompt: "Extract all house listings from this Redfin page. For each house, get: address, number of bedrooms, number of bathrooms, square feet, and price. Return as a JSON array with objects containing fields: address, bedrooms, bathrooms, squareFeet, price. Do not say or explain anything else, just return the requested JSON data.", context: content }); let houseData = JSON.parse(result); return houseData; } ``` ## Repeating a task on multiple objects on a page Having successfully used Simular Pro to [read structured information](#reading-structured-information), such as getting 1. all the names of companies on a page, or 2. all the store locations of a grocery chain, or 3. all the influencer channel names, etc. now you may need to repeat some task on each of those items, such as: 1. checking each company's stock prices, 2. each grocery store's items on sale 3. each influencer's subscriber count The following examples show how to instruct Simular Pro to iterate through all the items and do a follow-up task reliably on each item. ### Opening and reading all Simular blog posts ```text Instruction theme={null} Go to simular.ai/blog Get all the blog post URLs For each blog post URL, open it, extract the post title and a short summary, then close the tab. Print out the post titles and summaries. ``` ```javascript Simulang v0 theme={null} //@ Go to simular.ai/blog and get all blog post URLs function getBlogPostUrls() { open({url: "simular.ai/blog"}) wait({waitTime: 3}) var content = pageContent() var result = ask({ prompt: "Find all blog post URLs on this page. Return as a JSON array of complete URLs only. Do not say or explain anything else, just return the requested data.", context: content }) return JSON.parse(result) } //@ Extract title and summary from a blog post function extractPostInfo(url) { open({url: url}) wait({waitTime: 3}) var content = pageContent() var result = ask({ prompt: "Extract the blog post title and create a short summary (2-3 sentences) of the main content. Format as a JSON object with fields 'title' and 'summary'. Do not say or explain anything else, just return the requested data.", context: content }) return JSON.parse(result) } function main() { // Get all blog post URLs var blogUrls = getBlogPostUrls() var allPosts = [] // Process each blog post for (var i = 0; i < blogUrls.length; i++) { var url = blogUrls[i] // Extract title and summary var postInfo = extractPostInfo(url) postInfo.url = url allPosts.push(postInfo) // Close the current tab press({key: "w", cmd: true}) wait({waitTime: 1}) console.log(`Title: ${postInfo.title}`) console.log(`Summary: ${postInfo.summary}`) console.log(`URL: ${url}`) console.log("---") } return { success: true, posts: allPosts } } ``` ## Structured information output The sections above show you how Simular Pro can [read structured information](#reading-information-from-an-application-or-webpage) and [repeats a task](#repeating-a-task-on-multiple-objects-on-a-page) on 100 webpages - now you need it to write that valuable information somewhere. This section shows you many options to write structured output to a local file on disk or a web browser application. If you cannot find an output format you need, just ask us on [Discord](https://discord.gg/E2XfsK9fPV). ### Writing information into a Google Sheet ```text Instruction theme={null} Open a new Google Sheet Add headers Name, Summary, Date Write "Simular", "Simular pro can do anything!", "08/30/2025" into the first row. ``` ```javascript Simulang v0 theme={null} function main() { // Create a new Google Sheet open({url: "https://sheets.google.com/create"}); wait({waitTime: 2}); // Add headers setGoogleSheetCellValue({cell: "A1", value: "Name"}); setGoogleSheetCellValue({cell: "B1", value: "Summary"}); setGoogleSheetCellValue({cell: "C1", value: "Date"}); // Add data to the first row (row 2, since row 1 has headers) setGoogleSheetCellValue({cell: "A2", value: "Simular"}); setGoogleSheetCellValue({cell: "B2", value: "Simular pro can do anything!"}); setGoogleSheetCellValue({cell: "C2", value: "08/30/2025"}); return {success: true}; } ``` ### Writing information into Excel ```text Instruction theme={null} Open a new blank sheet in Excel Add headers Name, Summary, Date Write "Simular", "Simular pro can do anything!", "08/30/2025" into the first row. ``` ```javascript Simulang v0 theme={null} function main() { // Open Excel and create a new blank sheet open({app: "Microsoft Excel"}); // Create new blank workbook press({key: "n", cmd: true}); wait({waitTime: 2}); // Add headers in the first row click({concept: "cell A1"}); type({text: "Name"}); press({key: "tab"}); type({text: "Summary"}); press({key: "tab"}); type({text: "Date"}); // Move to the second row and add the data click({concept: "cell A2"}); type({text: "Simular"}); press({key: "tab"}); type({text: "Simular pro can do anything!"}); press({key: "tab"}); type({text: "08/30/2025"}); return {success: true}; } ``` ## Clicking on UI elements Sometimes, the basic `click({at: })` may not be enough for Simular Pro to identify a unique element. This may happen when more than one element share the same text description, or when the target element only has a visual label (e.g., image or icon). In these cases, you have two options: 1. In Settings, enable vision fallback for the click action. Simular Pro will automatically attempt to use the best method for UI localization. 2. Use more precise inputs to the `click` function, as shown by examples below. You can find the full specification of inputs to the `click` function [here](simulang#click). Use the element picker tool to check the text description of your target element. ### Clicking one of multiple elements that have the same description or image. This pattern is a powerful and fast way to localize a target element whose textual description may not be unique: ``` click({ at: , spatialRelation: , anchorConcept: }) ``` You may use one from each of the following three spatial relation categories for `spatialRelation`: * distance: closest, furthest * positional filters: left, right, above, below, * containment filters: contains, containedIn For example, this will find the unique element called "link Introduction" that is above of and closest to a unique element called "heading Simular Pro": ``` click({ at: "link Introduction", spatialRelation: "above,closest", anchorConcept: "heading Simular Pro" }) ``` Here is an example drawn from this current page: ```text Instruction theme={null} Go to docs.simular.ai Click on Introduction closest to Getting Started Click on Introduction closest to Simulang Click on Introduction closest to Agent S Click on Introduction closest to Simular ``` ```javascript Simulang v0 theme={null} function main() { // Go to docs.simular.ai open({url: "https://docs.simular.ai"}); // Click on Introduction closest to Getting Started click({at: "Introduction", spatialRelation: "closest", anchorConcept: "Getting Started"}); wait({waitTime: 1}); // Click on Introduction closest to Simulang click({at: "link Introduction", spatialRelation: "below,closest", anchorConcept: "heading Simulang", mode: "anchorGrounding"}) wait({waitTime: 1}); // Click on Introduction closest to Agent S click({at: "link Introduction", spatialRelation: "above,closest", anchorConcept: "heading Agent S", mode: "anchorGrounding"}) wait({waitTime: 1}); // Click on Introduction closest to Simular click({at: "link Introduction", spatialRelation: "below,furthest", anchorConcept: "link Blog", mode: "anchorGrounding"}) wait({waitTime: 1}); return {success: true}; } ``` When attempting to close a popup window, you may need to distinguish between the close button of the popup window and the close button of the outer application. You can instruct Simular Pro to click the close button contained in the dialog window. Use the element picker tool to get the description of the anchor element. ```text Instruction theme={null} Click the close button contained in the group dialog. ``` ```javascript Simulang v0 theme={null} function main() { Click({ at: "button close", spatialRelation: "containedIn", anchorConcept: "group dialog Find and replace" }); } ``` ### Clicking on an element without text description If your target element is a pure image without any text description, then you should use the vision mode to localize the element: ``` click({at: , mode: "vision"}) ``` Use the element picker tool to check whether your target element has any useful text description. ```text Instruction theme={null} Go to docs.simular.ai Click the Simular logo using vision ``` ```javascript Simulang v0 theme={null} function main() { // Navigate to docs.simular.ai open({url: "https://docs.simular.ai"}); click({at: "simular logo", mode: "vision"}) } ``` Sometimes you may need to click on an empty space on the current screen, such as when applying a signature to some area of a document. ```text Instruction theme={null} Click the empty space below the date. ``` ```javascript Simulang v0 theme={null} function main() { click({at: "the space below the date", mode: "vision"}) } ``` ### Clicking on an element using both text and screenshot If neither specifying spatial relations nor pure vision work, you may need a combination of both to localize an element. The mode `textAndScreenshot` is able to localize any element that has a text description. ``` click({at: , mode: "textAndScreenshot"}) ``` You may use any natural language for the description of the element, including any referring expressions (e.g., "link Introduction in the Simulang section") ```text Instruction theme={null} Open docs.simular.ai Click the introduction link in the simulang section ``` ```javascript Simulang v0 theme={null} function main() { open({url: "https://docs.simular.ai"}) click({at: "link Introduction in the Simulang section", mode: "textAndScreenshot"}) } ``` # Introduction Source: https://docs.simular.ai/simular-pro/introduction Welcome to Simular Pro documentation **Simular Pro** is an advanced **desktop automation tool** designed to seamlessly automate desktop applications and workflows. By leveraging **fine-grained control** over the operating system, Simular Pro enables users to interact with applications, execute tasks, and streamline complex workflowsβ€”all with AI-driven intelligence. ## Key Features * **Full Desktop Automation** – Automate interactions with applications, files, and system processes just like a human user. * **Fine-Grained Control** – Execute **precise** and **complex** operations within desktop environments. * **Simulang Scripting** – Uses a **JavaScript-based syntax**, making automation flexible and developer-friendly. * **Cross-Application Support** – Control multiple applications and switch between them programmatically. * **Task Automation & AI Agents** – Automate repetitive tasks, schedule workflows, and integrate AI-driven agents. * **Secure & Efficient** – Designed for reliability and security in professional environments. ## System Requirements * **Currently supports macOS 15.0+** * Support for other operating systems is under development. Apply for Windows access [here](https://docs.google.com/forms/d/e/1FAIpQLScp5VbkF3tst1qVuzM1Z1WTfslPWuO5QJfFU9dBe6ljwr0E0Q/viewform). ## Get access Simular Pro is **currently for macOS by invitation only**. Download [here](https://www.simular.ai/simular-pro), try some preview actions for free, and apply for full access today! For **business users**, please **[contact us](mailto:support@simular.ai)** to request early access and explore enterprise solutions. # Simulang v0 Source: https://docs.simular.ai/simular-pro/simulang Simulang v0 API reference β€” the action vocabulary used inside the Simular app. Simular Pro gives you the highest level of flexibility and precise control over the full desktop via Simulang, a specialized set of intuitive and easy-to-use action building blocks defined on top of Javascript. While basic prompting of Simular using the chat mode may produce a good initial plan (in Simulang), full success for complex workflows may require edits to some steps in the plan. **Simulang v0 (Simular app only).** This page documents the **v0** JavaScript-style actions that run **inside the Simular app** when you author or refine desktop workflows in Simular Pro. It does not describe the standalone Simulang CLI, `simulang-js` scripting, or other surfaces; for those, see the [Simulang Primer](/simulang/simulang-primer) and [Simulang with Claude Code](/simulang/simulang-claude-code). The best way to learn Simulang is by [Simulang v0 examples](/simular-pro/examples). Find out how to: * [Read structured information](/simular-pro/examples#reading-structured-information) * [Repeat a task on multiple objects](/simular-pro/examples#repeating-a-task-on-multiple-objects-on-a-page) * [Write structured output](/simular-pro/examples#structured-information-output) * [Locate an element precisely](/simular-pro/examples#clicking-on-ui-elements) ## General ### Act Completes a task specified in natural language, up to a maximum number of steps. Returns: None ```javascript function theme={null} function Act({ task: String = "", maxSteps: Int = 100 }) ``` ```javascript Find all events of 100 museums in San Francisco theme={null} Act({task: "Find all events of 100 museums in San Francisco", maxSteps: 1000000}) ``` An arbitrary task. Stop when this number of primitive actions have been executed. ## Application ### Open Open or switch to an application. Returns: None ```javascript function theme={null} function Open({ app: String = null, url: String = null, waitForLoadComplete: Bool = true, waitTime: Int = 0 }) ``` ```javascript open chrome theme={null} Open({app: "Google Chrome"}) ``` ```javascript go to Zoom app theme={null} Open({app: "Zoom"}) ``` ```javascript switch to Slack theme={null} Open({app: "Slack"}) ``` ```javascript go to simular.ai theme={null} Open({url: "https://simular.ai"}) ``` application name, e.g., Google Chrome, iMessage. url address of a web page, e.g., google.com Whether or not to wait for the app or URL to complete loading. Default is true. Duration in seconds to wait after opening the app or URL, in addition to the wait for load. ## Keyboard control ### Type Type using the keyboard. Returns: None ```javascript function theme={null} function Type({ text: String, withReturn: Bool = false, waitTime: Int = 0, waitForLoadComplete: Bool = false }) ``` ```javascript Enter John Smith with return theme={null} Type({text: "John Smith", withReturn: true}) ``` ```javascript Type John Smith theme={null} Type({text: "John Smith"}) ``` ```javascript Type https://google.com and press enter theme={null} Type({text: "https://google.com", withReturn: true}) ``` A piece of text to type. Whether or not to press the return (enter) key after typing. Duration in seconds to wait after typing. Whether or not to wait for a page to complete loading after typing. ### Shortcut Perform keyboard shortcut in the current application. Returns: None ```javascript function theme={null} function Shortcut({ key: String, cmd: Bool = false, ctrl: Bool = false, option: Bool = false, shift: Bool = false, waitTime: Int = 0 }) ``` ```javascript press ctrl+a theme={null} Shortcut({key: "a", ctrl: true}) ``` ```javascript use shortcut to select all theme={null} Shortcut({key: "a", cmd: true}) ``` ```javascript press cmd+shift+t theme={null} Shortcut({key: "t", cmd: true, shift: true}) ``` ```javascript press option and down arrow theme={null} Shortcut({key: "downArrow", option: true}) ``` ```javascript press enter theme={null} Shortcut({key: "enter"}) ``` A key to be pressed Whether the command modifier should be pressed when tapping the key. Whether the control modifier should be pressed when tapping the key. Whether the option modifier should be pressed when tapping the key. Whether the shift modifier should be pressed when tapping the key. Time in second to wait after executing the action. ## Mouse Control ### Click Click on something, either specified by the `at` argument or the `element` argument. Disambiguate by specifing the spatial relation between the target element and an anchor concept. Available modes: 1. default is text-based grounding. 2. "textAndScreenshot": grounding using both text and vision. 3. "vision": vision-only grounding. When using modes with vision, all other arguments are ignored except `withCommand`, `clickType` and waits. Returns: None ```javascript function theme={null} function Click({ at: String = "", mode: String = "", clickType: String = "left", withCommand: Bool = false, element: UIElement = null, spatialRelation: String = "", anchorConcept: String = "", prior: String = "none", position: String = "center", includeInvisible: Bool = false, waitForLoadComplete: Bool = false, waitTime: Int = 0 }) ``` ```javascript click new tab theme={null} Click({at: "new tab"}) ``` ```javascript cmd+click verify insurance button theme={null} Click({at: "verify insurance button", withCommand: true}) ``` ```javascript double click Styles.zip theme={null} Click({at: "Styles.zip", clickType: "doubleClick"}) ``` ```javascript click "slider" closest to and on the right of "pointer size" theme={null} Click({at: "slider", spatialRelation: "closest,right", anchorConcept: "pointer size"}) ``` Description of a target object to click. For higher accuracy, describe the target object by its role and value, e.g. "sign in button", "first name textfield". options: "textAndScreenshot", "vision". Leave empty for default text-based grounding. Type of click. Options are: "left" (default), "right", and "doubleClick" (two quick left clicks) If true, agent presses the command key during click. A UIElement. If given, ignores the `at` argument and directly clicks on this element. A comma-separated String of spatial relationship between the target object and element(s) that best match the `anchorConcept`. Options are: "closest", "furthest", "above", "right", "below", "left", "contains", "containedIn" Description of an object used as an anchor with `spatialRelation`. A optional global spatial location prior used for disambiguation among elements that have similar descriptions. Options are: "left", "right", "top", "bottom". For example, "left" means to choose the left-most element among candidates. Position within the frame of an element to click. Options are: topleft, topcenter, topright, middleleft, center, middleright, bottomleft, bottomcenter, bottomright, anywhere Whether or not to find the target from sections of the page that are not currently visible (i.e., needs scrolling). If true, waits for page to finish loading after the click. Integer number of seconds to wait after click. ### Move Moves the cursor to an object. Disambiguate by specifing the spatial relation between the target element and an anchor concept. All parameters besides `to` have the same definition as those in the `Click` action. Returns: None ```javascript function theme={null} function Move({ to: String = "", element: UIElement = null, spatialRelation: String = "", anchorConcept: String = "", prior: String = "none", includeInvisible: Bool = false, waitForLoadComplete: Bool = false, waitTime: Int = 0 }) ``` ```javascript Move to textarea below verify insurance theme={null} Move({to: "textarea", spatialRelation: "below", anchorConcept: "verify insurance"}) ``` Description of a target object to click. For higher accuracy, describe the target object by its role and value, e.g. "sign in button", "first name textfield". See definition in `Click`. See definition in `Click`. See definition in `Click`. See definition in `Click` See definition in `Click` See definition in `Click` See definition in `Click` See definition in `Click` ### Drag Drag on the screen, starting from where the mouse is located Returns: ```javascript function theme={null} function Drag({ to: String = "", element: UIElement = null, destinationApp: String = null }) ``` ```javascript drag to "testFolder" in Google Chrome theme={null} Drag({to: "testFolder", destinationApp: "Google Chrome"}) ``` ```javascript drag to "testFolder" in the same app theme={null} Drag({to: "testFolder"}) ``` the destination of the drag action in string the destination of the drag action as UI Element the target app, if destination is not in the same application as the origin ### Scroll Scroll on the screen in a specified direction. Returns: None ```javascript function theme={null} function Scroll({ direction: String = "down", distance: Int = 200 }) ``` ```javascript Scroll down theme={null} Scroll({direction: "down"}) ``` ```javascript Scroll up 500 pixels theme={null} Scroll({direction: "up", distance: 500}) ``` ```javascript Scroll left 200 pixels theme={null} Scroll({direction: "left", distance: 200}) ``` ```javascript Scroll right a bit theme={null} Scroll({direction: "right", distance: 100}) ``` ```javascript Scroll down to see more content theme={null} Scroll({direction: "down", distance: 300}) ``` The direction to scroll (up, down, left, right) Default is down. The scroll distance in pixels. Default is 200. ## Perception ### stateSatisfies Checks whether the current screen satisfies the specified condition. This is useful for checking complex conditions that cannot be easily checked by [ConceptsExist](#ConceptsExist) with simple element descriptions. However, it may be slower and use more tokens than `ConceptsExist` for large pages. Returns: true if the current screen satisfies the condition, false otherwise. ```javascript function theme={null} function stateSatisfies({ condition: String }) ``` ```javascript if the current state requires login, then respond to the user to request login theme={null} if (stateSatisfies({condition: "requires login"})) { Respond({message: "Please log in", requireConfirm: true}) } ``` A condition to check on the current screen ### ConceptsExist Checks whether all the concepts can be found on the current visible screen. Each concept must be a substring of the text description of an element in the current focused application. This is faster and more token-efficient than [stateSatisfies](#stateSatisfies) for checking conditions that can be represented by a small set of element descriptions. Use the element picker tool to check the text description of any element in the currently focused application. Returns: If all concepts can be found, returns true, otherwise false. ```javascript function theme={null} function ConceptsExist({ concepts: [String] }) ``` ```javascript if there is a play button, click it theme={null} if (ConceptsExist({concepts: ["play button"]})) { click({at: "play button"}) } ``` ```javascript if the page has a sign in button and a log in button, ask user to log in theme={null} if (ConceptsExist({concepts: ["sign in button", "log in button"]})) { respond({message: "Could you log in?", requireConfirm: true}) } ``` An array of target concepts to find. ### pageContent Gets a JSON object containing the structural text content and base64 encoded image of the current screen. This object can be sent to a vision-language model for answering questions about the current screen. Returns: A JSON dictionary with the following fields: * text: A text description of the current web page; * imageFilePath: temporary location in memory of the screenshot (accessible by `ask`). ```javascript function theme={null} function pageContent({ }) ``` ```javascript What is the color of this page? theme={null} var content = pageContent({}); var color = ask({prompt: "What is the color of this page? Return only the color:", context: content}); ``` ## Text Generation ### ask Runs a large vision-language model on the given input prompt string and a JSON dictionary context. Often used after pageContent(). Returns: String response from a large vision language model. ```javascript function theme={null} function ask({ prompt: String, context: [[String: String]] }) ``` ```javascript write a poem about the content of the current page theme={null} var content = pageContent({}); var output = ask({{prompt: "Write a poem about the content", context: content}}); ``` ```javascript check two pages' differences theme={null} var content1 = pageContent({}); doSomething({}) var content2 = pageContent({}); var content = [content1,content2] var output = ask({{prompt: "What are the difference between these two pages? ", context: content}}); ``` String query to a large vision language model. Array of JSON dictionaries, each containing the following fields: * text: an optional text description of the current web page. * imageFilePath: an optional path in memory of a screenshot taken by `pageContent()`. Also accepts a single JSON dictionary, such as the output of `pageContent()`. ## Wait ### Wait Put Agent into sleep state for a certain amount of time. Returns: None ```javascript function theme={null} function Wait({ waitTime: Int, unit: String = "s" }) ``` ```javascript Wait for 3s theme={null} Wait({waitTime: 3}) ``` ```javascript Wait for 500ms theme={null} Wait({waitTime: 500, unit: "ms"}) ``` Options are "s" for seconds (default) and "ms" for milliseconds. Duration of time to wait in the given units. ### WaitForConcepts Waits until all concepts can be found in the current frontmost window. If not all concepts can be found within 10 seconds, action returns failure Returns: None ```javascript function theme={null} function WaitForConcepts({ concepts: [String] }) ``` ```javascript Wait for the log in button and sign up button to show up theme={null} WaitForConcepts({concepts: ["log in button", "sign up button"]}) ``` An array of target concepts to find. ## User interaction ### Respond Respond to the user with a short message. Optionally require the user to give a yes/no answer or input text to proceed. Returns: * If `requireConfirm` is true, then this function returns true if the user chooses "yes", returns false if the user chooses "no". * If `requireTextInput` is true, then returns the string value that the user submitted. * Otherwise, returns true ```javascript function theme={null} function Respond({ message: String, requireConfirm: Bool = false, requireTextInput: Bool = false }) ``` ```javascript Ask the user for confirmation theme={null} Respond({message: "Could you confirm?", requireConfirm: true}) ``` ```javascript Output llmResult to the user theme={null} Respond({message: llmResult}) ``` A message to show to the user. Whether or not user confirmation is required to proceed with the remaining actions. Default is false. If requireConfirm is true, then the message must be phrased as a question, to which the only possible responses are "yes" and "no". Whether or not to require the user to input text before proceeding. Default is false. If requireTextInput is true, then the user will be prompted to input text after the message is shown. ## System IO ### CopyToClipboard Copies a String to clipboard. Returns: None ```javascript function theme={null} function CopyToClipboard({ text: String }) ``` ```javascript copy cell to the clipboard theme={null} CopyToClipboard({text: cell}) ``` Text to be copied to the clipboard. ### GetFromClipboard Get the content of the current clipboard. Returns: Content of the currrent clipboard ```javascript function theme={null} function GetFromClipboard({ }) ``` ```javascript get the clipboard content theme={null} var clipboardContent = GetFromClipboard({}) ``` ### SaveScreenshot Takes a screenshot of an element on the screen or the whole screen, and saves the screenshot as a PNG to a file. Returns: None ```javascript function theme={null} function SaveScreenshot({ element: UIElement = null, fileName: String = null, directory: String = null }) ``` ```javascript Save screenshot of whole screen to screenshot.png theme={null} SaveScreenshot({fileName: "screenshot.png"}) ``` ```javascript Screenshot the group element and save to clipboard theme={null} SaveScreenshot({element: group}) ``` ```javascript Screenshot the table element and save to /User/path/to/screenshot/ theme={null} SaveScreenshot({element: table, directory: "/User/path/to/screenshot/"}) ``` If provided, limit the screenshot to the frame of the element. Default is the whole screen. Name for the image name, default is "simularSavedImage.png". Directory to save the image, default at desktop. ### ScreenshotToClipboard Take a screenshot of an element or the current page and save it to the system clipboard Returns: None ```javascript function theme={null} function ScreenshotToClipboard({ element: UIElement = null }) ``` ```javascript take screenshot and save to clipboard theme={null} ScreenshotToClipboard({}) ``` ```javascript get the table element on the page, save a screenshot of it to clipboard theme={null} var elements = GetElements({elementRoles: ["table"]}) ScreenshotToClipboard({element: elements[0]}) ``` If provided, limit the screenshot to the frame of the element. Default is the whole screen. ### ReadFile Read the contents of a file whose location is specified by `path`. Returns: Contents of the file as a String ```javascript function theme={null} function ReadFile({ path: String }) ``` ```javascript read the file named results.json theme={null} var results = ReadFile({path: "results.json"}) ``` ```javascript get contents of file /Users/somebody/Documents/project/links.txt theme={null} var links = ReadFile({path: "/Users/somebody/Documents/project/links.txt"}) ``` Either an absolute path to a file, or a name of a file (assumed to be in the default app cache directory). ### WriteToFile Writes the given text to a file. If the file already exists, then appends text to it, with an option to overwrite the existing content. Unless specified path, writes to /Library/Caches/com.simular.Simular-Pro/SimularActionResult/ Will throw an error if there is an existing non-folder file named SimularActionResult Returns: None ```javascript function theme={null} function WriteToFile({ text: String, path: String? = "SimularActionResult.txt", overwrite: Bool = false }) ``` ```javascript Append jsonResult to /User/somebody/Documents/result.json theme={null} WriteToFile({text: jsonResult, path: "/User/somebody/Documents/result.json"}) ``` ```javascript Write jsonResult to /User/someone/Desktop/result.json, overwrite existing file. theme={null} WriteToFile({text: jsonResult, path: "/User/someone/Desktop/result.json", overwrite: true}) ``` ```javascript Write jsonResult to default action result file, overwrite existing file. theme={null} WriteToFile({text: jsonResult, overwrite: true}) ``` Text to write to a file. path of the file, default at /Library/Caches/com.simular.Simular-Pro/SimularActionResult/.txt. If path contains "/", treat it as full path Whether or not to overwrite the contents if filePath points to an existing file. ## Google Sheet control ### GetGoogleSheetCellValue Gets the value of a cell in a Google Sheet. Returns: Value of the cell ```javascript function theme={null} function GetGoogleSheetCellValue({ cell: String }) ``` ```javascript get the description of cell B42. theme={null} var cellValue = GetGoogleSheetCellValue({cell: "B42"}) ``` Label of a cell. Column is indicated by a capital letter and row is indicated by a number. For example "B42" is the cell at column B row 42. ### SetGoogleSheetCellValue Sets the value of a Google Sheet cell. Returns: None ```javascript function theme={null} function SetGoogleSheetCellValue({ cell: String, value: String }) ``` ```javascript write "Simular" into cell B42 theme={null} SetGoogleSheetCellValue({cell: "B42", value: "Simular"}) ``` Label of a cell. Column is indicated by a capital letter and row is indicated by a number. For example "B42" is the cell at column B row 42. value to write to the cell ### GetGoogleSheetColumns Gets the column ids of each header in a given array of column headers in a Google Sheet. For example, if the sheet has column headers "website", "description", "date" in cells A1, B1, C1, respectively, then `GetGoogleSheetColumns(headers: ["website", "description", "date"])` returns \["A", "B", "C"] Note: This function currently assumes that the table headers are on row 1. Returns: Array of column id, each is a capital letter from A to Z ```javascript function theme={null} function GetGoogleSheetColumns({ headers: [String] }) ``` ```javascript get the columns for the headers "description" and "website" theme={null} var columns = GetGoogleSheetColumns({headers: ["description", "website"]}) ``` Array of column header ## Advanced GUI functions ### GetElements Get elements that satisfy some conditions inside the current frontmost application or inside a root element (if given). For disambiguation, one can constrain the search to elements that satisfy certain spatial relations to anchor elements. This function supports multiple return types according to `returnType`. Returns: Depending on returnType: \[UIElement], String, \[String], \[String: UIElement] ```javascript function theme={null} function GetElements({ elementRoles: [String] = [], elementOverallDescription: String = "", threshold: Double = 0.75, root: UIElement = null, spatialRelation: String = "", anchorRole: String = "", anchorOverallDescription: String = "", anchorElements: [UIElement] = [], horizontalRank: Int = null, verticalRank: Int = null, sortBy: String = "", useNeighborForMissingDescription: Bool = false, returnType: String = "elementArray" }) ``` ```javascript get all links from the page theme={null} var allLinks = GetElements({elementRoles: ["link"]}) ``` ```javascript Get all comboBox elements to the right of text "state selection" theme={null} var comboBoxes = GetElements({elementRoles: ["comboBox"], spatialRelation: "right", anchorRole: "staticText", anchorOverallDescription: "state selection"}) ``` ```javascript Get all cells in the table and return as dictionary theme={null} var cellDict = GetElements({elementRoles: ["cell"], spatialRelation: "containedIn", anchorRole: "table", returnType: "strToElemDict"}) ``` Constrains the search to elements whose role is included in this array of roles. Required if elementOverallDescription is not given. Description of elements to get from the page. Required if elementRoles are not provided. If `elementOverallDescription` is given, then accept candidate elements whose normalized string similarity to `elementOverallDescription` is above this threshold value. If given, then the search is limited to elements contained within this root element. A comma-separated String of spatial relationships between the target elements and the anchor. Available options are: "closest", "furthest", "above", "right", "below", "left", "contains", "containedIn", "sameRow", "sameColumn" Role of element(s) used as anchor for spatial relation. Description of an object used as an anchor with spatialRelation. Elements to use as anchor for spatial relation constraints. If `anchorElements` is provided, then anchorRole and anchorOverallDescription are ignored. If given, sorts the elements by x-coordinate of frame midpoint and returns the element with this rank. Left-most element has rank 1. If given, sorts the elements by y-coordinate of frame midpoint and returns the element with this rank. Top-most element has rank 1. Returns the found elements in sorted order, by "x" (left to right) or "y" (top to bottom). Used only if `returnType` is "elementArray". Whether or not to use the description of an element's neighbor as a substitute if the element's description is empty. This is only used if returnType involves returning element descriptions. Options are: "elementArray" (default), "string", "stringArray", "strToElemDict". * elementArray: returns an array of UIElements * string: returns a semicolon-separated string of descriptions of found elements * stringArray: returns an array of String descriptions of found elements * strToElemDict: returns a \[String: Element] dictionary with element description as keys and corresponding element as value ### GetAttributeOfElement Searches for an element that matches the input criteria and gets the element's value for a specified attribute. Returns: String value of an attribute of an element ```javascript function theme={null} function GetAttributeOfElement({ elementRole: String = "", elementOverallDescription: String = "", attribute: String = "", threshold: Double = 0.75, root: UIElement = null, spatialRelation: String = "", anchorRole: String = "", anchorOverallDescription: String = "", anchorElements: [UIElement] = [], horizontalRank: Int = null, verticalRank: Int = null }) ``` ```javascript Get the value of the radioButton element with description "radioButton tab point & click" theme={null} var value = GetAttributeOfElement({elementRole: "radioButton", elementOverallDescription: "radioButton tab point & click", attribute: "value"}) ``` ```javascript Get the value of the valueIndicator element closest to and on the right of "statictext text double-click speed" theme={null} var value = GetAttributeOfElement({elementRole: "valueIndicator", attribute: "value", spatialRelation: "closest,right", anchorOverallDescription: "statictext text double-click speed"}) ``` Role of the target element. Required if elementOverallDescription is not given. Description of the element. Required if elementRoles are not provided. Valid options are: "role", "description", "title", "value". For example, use "value" to get the value of text elements. If `elementOverallDescription` is given, then accept candidate elements whose normalized string similarity with `elementOverallDescription` is above this threshold value. If given, then the search is limited to elements contained within this root element. A comma-separated String of spatial relationships between the target elements and the anchor. Role of element(s) used as anchor for spatial relation. Description of an object used as an anchor with spatialRelation. Elements to use as anchor for spatial relation constraints. If `anchorElements` is provided, then anchorRole and anchorOverallDescription are ignored. If given, sorts the elements by x-coordinate of frame midpoint and returns the element with this rank. Left-most element has rank 1. If given, sorts the elements by y-coordinate of frame midpoint and returns the element with this rank. Top-most element has rank 1. ### GetContent Get text content from the current frontmost window or a region corresponding to the provided concept or element. Returns: If `inElement` argument is given or the frontmost window was used (because neither `inConcept` nor `inElement` was given), then returns a single String. Otherwise, returns a \[String] array with one String per root element. ```javascript function theme={null} function GetContent({ inConcept: String = "", inElement: UIElement = null, format: String = "flat" }) ``` ```javascript get content from page in json format theme={null} var pageContent = GetContent({format: "json"}) ``` ```javascript get content from the table element in XML slim format theme={null} var tableContent = GetContent({inElement: table, format: "xmlSlim"}) ``` ```javascript get content inside group job post details theme={null} var groupContent = GetContent({inConcept: "group job post details"}) ``` Gets content in elements that match this concept. Get content in this element. Format of the returned content. Options are: "flat" (unformatted text), "json", "xml", "xmlSlim" (same as XML, with empty tags removed) ### GetCells Get all cells from a row or column element. Either row or column must be given. Returns: An array of cell elements contained in the given row or column. If input is a row, the output array is sorted by increasing x-coordinate (left to right). If input is a column, the output array is sorted by increasing y-coordinate (top to bottom). ```javascript function theme={null} function GetCells({ row: UIElement = null, column: UIElement = null }) ``` ```javascript get all cells in the first row theme={null} var rows = GetElements({elementRoles: ["row"], sortBy: "y"}) var cells = GetCells({row: rows[0]}) ``` A row element that contains one or more cells. A column element that contains one or more cells. ### GetCellValue Get the value of a given cell element. Returns: Value contained in the cell. ```javascript function theme={null} function GetCellValue({ cell: UIElement }) ``` ```javascript Get the value of the cell theme={null} var cellValue = GetCellValue({cell: cell}) ``` A cell element. ### GetCellLabel Get the label of the given cell element in Excel. Returns: cell's label String. Example: "A1" ```javascript function theme={null} function GetCellLabel({ cell: UIElement }) ``` ```javascript Get the label of the cell theme={null} var label = GetCellLabel({cell: cell}) ``` A cell element ### GetCellIndices Given an array of table cell values, return a corresponding array of cell indices. For example, suppose the table has value1 in cell A10, then `GetCellIndices(cellValues: ["value1"])` returns \["A10"] Returns: \[String] array of cell indices ```javascript function theme={null} function GetCellIndices({ cellValues: [String] }) ``` ```javascript Get the indices of the cells containing value1 and value2 theme={null} var cellIndices = GetCellIndices({cellValues: ["value1", "value2"]}) ``` values of the cell ### GetTableColumn Given a header or a index String, return the column under it as \[index: Element] dictionary If the table has a column with header "Website" in cell A1, and elements elem1 and elem2 under it, then this function returns \["A2": elem1, "A3": elem2]. Returns: Dictionary of \[String: UIElement] pair for all information in the column under header ```javascript function theme={null} function GetTableColumn({ header: String = null, index: String = null }) ``` ```javascript Get the columns under Website theme={null} var websiteColumn = GetTableColumn({header: "Website"}) ``` ```javascript Get the columns under index A1 theme={null} var A1Column = GetTableColumn({index: "A1"}) ``` value of column header. index of column header, e.g. "B42". ### GetStructuredDescription Gets XML-formatted description of the contents in each element. Returns: An array of String `[s_1, ..., s_n]`, where each `s_i` is an XML-formatted description of the contents rooted at `u_i`. ```javascript function theme={null} function GetStructuredDescription({ fromElements: [UIElement] }) ``` ```javascript get the elements with role "group" and description "group under plan progress", then get description of the elements in XML format theme={null} var elements = GetElements({elementRoles: ["group"], elemOverallDescription: "group under plan progress"}) var description = GetStructuredDescription({fromElements: elements}) ``` An array of UIElements `[u_1, ..., u_n]`.