# BusyIndicator

A **BusyIndicator** object lets you control the breadcrumbs bar busy indicator from your script.

![](https://3597805814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3XSZSwWow0fDf6fQJobd%2Fuploads%2Fgit-blob-0c2b83dbd29b40301763b94163f5c9cbd7dd5b7b%2Fthrobbler.png?alt=media)

By default a busy indicator simply indicates that something is happening; it can also be used to indicate the progress of a job (percentage complete from 0% to 100%). The user can click the spinning circle to see a description of the jobs that are running, and each job can optionally allow the user to abort it by displaying an *Abort* link they can click.

**BusyIndicator** objects are created using the [**DOpusFactory**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dopusfactory)**.BusyIndicator** method. The basic steps for using one in your script are:

1. Create the object by calling **DOpus.Create.BusyIndicator()**.
2. Optionally set the **abort** property to **True** to enable user aborting.
3. Call the **Init** method to initialize and display the busy indicator.
4. Call the **Update** method when needed to update the progress or explanatory text.
5. Poll the **abort** property to check for user abort if desired.
6. Call the **Destroy** method to remove the busy indicator when the job is complete.

| Property Name | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| abort         | *bool*      | <p>Before the <strong>Init</strong> method has been called, you can set this property to <strong>True</strong> to enable abort by the user (as shown above).<br>After <strong>Init</strong> has been called, this property will return <strong>True</strong> if the user has clicked the <em>Abort</em> link.<br>The <strong>abort</strong> property does not change if the lister or tab your <strong>BusyIndicator</strong> is associated with closes. If you need to stop when that happens then you must check for it separately, typically by testing the result of the <strong>Update</strong> method.</p> |

| Method Name | **Arguments**                                                       | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------- | ------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Destroy     | *none*                                                              | *bool*      | <p>Removes the busy indicator from display and destroys its internal data structures. The <strong>BusyIndicator</strong> object itself can be re-used by calling the <strong>Init</strong> method again.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Hide        | *none*                                                              | *bool*      | <p>Removes the busy indicator from display, but does not destroy its internal data. The indicator can be re-displayed by calling the <strong>Show</strong> method.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Init        | <p>\<object:window><br>\<string:description><br>\<bool:visible></p> | *bool*      | <p>Initializes a <strong>BusyIndicator</strong> object and optionally displays it.<br>The <strong>window</strong> parameter specifies the <a href="lister"><strong>Lister</strong></a> or <a href="tab"><strong>Tab</strong></a> object that the indicator is to be attached to. Using a <strong>Tab</strong> is usually best.<br>The optional <strong>description</strong> parameter lets you specify a text string that is displayed to the user when they click the spinning circle.<br>The optional <strong>visible</strong> parameter lets you make the indicator visible immediately by passing <strong>True</strong>. Alternatively, call the <strong>Show</strong> method to make the indicator visible.<br>Returns boolean success. Failure usually means the lister or tab was closed or invalid.</p> |
| Show        | *none*                                                              | *bool*      | <p>Displays the busy indicator.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Update      | <p>\<string:description><br>\<int:percentage></p>                   | *bool*      | <p>Updates the busy indicator.<br>The <strong>description</strong> parameter lets you specify a new description string.<br>The optional <strong>percentage</strong> parameter lets you specify a new progress bar percentage from 0 to 100. If no <strong>percentage</strong> is specified, and none was set by a previous call, the progress bar displays an animation indicating something is happening without a known percentage.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                       |


---

# 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://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/busyindicator.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.
