# TLO:SelectedItem

## Description

Used to return information on the object that is selected in your own inventory while using a merchant.

## Forms

* [*item*](/macroquest/data-types-and-top-level-objects/data-types/datatype-item.md) **SelectedItem**

## Access to Types

* [*item*](/macroquest/data-types-and-top-level-objects/data-types/datatype-item.md) **item**

## Examples

`/if ( !${SelectedItem.ID} ) {`\
`/echo Nothing in your inventory is selected`\
`} else {`\
`/echo Size of the item: ${SelectedItem.Size}`\
`}`

`/if ( ${SelectedItem.Charges} < 1 ) {`\
`Determines if the selected item is out of charges`\
`}`

`/if ( ${SelectedItem.Name.Equal[rusty dagger]} ) {`\
`Checks to see if the selected item is a rusty dagger`\
`}`

## See Also

* [Top-Level Objects](/macroquest/data-types-and-top-level-objects/top-level-objects.md)
* [item](/macroquest/data-types-and-top-level-objects/data-types/datatype-item.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://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/top-level-objects/tlo-selecteditem.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.
