> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/wifi-pineapple-pager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/wifi-pineapple-pager/spinner.md).

# SPINNER

`START_SPINNER` - Start an indeterminate spinner for a long-running task

`STOP_SPINNER` - Stop a running spinner and close the dialog

### When to use them <a href="#when-to-use-it" id="when-to-use-it"></a>

`START_SPINNER` shows an indeterminate progress spinner indicating a long-running task is underway.

`STOP_SPINNER` cancels a spinner when the task is complete.

### START\_SPINNER <a href="#start_spinner" id="start_spinner"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
START_SPINNER [message]
```

**message&#x20;*****required***

Message to display while the spinner is active. Messages should be kept short enough to fit on the device display.

{% hint style="warning" %}
In firmware **1.0.4 or older**, the spinner message must be a single word. Using a multi-word message will create a dialog which can not be cancelled.\
\
This is fixed in firmware **1.0.5 and newer** - on current firmware releases, use any spinner message you like!
{% endhint %}

<figure><img src="/files/slRvPqV30HeBq8XHh2wp" alt="A spinner"><figcaption><p>A spinner</p></figcaption></figure>

### Results <a href="#results" id="results"></a>

`START_SPINNER` returns an ID of the spinner as output. You **must** capture this value to cancel the spinner!

### STOP\_SPINNER <a href="#stop_spinner" id="stop_spinner"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
STOP_SPINNER {spinner_id}
```

**spinner\_id**

### Examples <a href="#examples" id="examples"></a>

```bash
__spinnerid=$(START_SPINNER "Thinking")
sleep 5
STOP_SPINNER ${__spinnerid}
```
