# Get Selected Text

{% hint style="info" %}
This is an imperfect solution due to Inbox AI being a sandboxed app on the AppStore, it cannot be improved while remaining on the AppStore.
{% endhint %}

Attempts to get the selected text from the screen. It does this by simulating a CMD+C keypress and reading the result of the clipboard. If this fails, or is empty, the result will be "NO SELECTED TEXT FOUND".

This command automatically has it [Next Action Field](/inbox-ai/actions/next-action-field.md) set to [Return Result to Previous AI](/inbox-ai/actions/built-in-actions/flow-control/return-result-to-previous-ai.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dreetje-1.gitbook.io/inbox-ai/actions/built-in-actions/system-actions/get-selected-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
