StatusItem Object

A StatusItem object allows you to display some status information to the user while your macro is running.

StatusItem Type Commands

StatusItem.newShownInDocument document, [message], [isShowProgress] v2.0.5

Returns a new StatusItem object that has been added to the given Document object. The information set in the returned item will be displayed in the small status bar along the bottom of the document’s window.

If isShowProgress is true, then a progress bar will be added to the status item, so the macro can give the user some indication about much longer an operation will take.

StatusItem.showSharedStatusWindow [message] v2.0.5

Returns a StatusItem object whose information will be displayed in the shared status window, a small floating dialog. While a macro is using the shared status window, other parts of Nisus Writer will not be allowed to display information in this window (eg: document loading progress).

The shared status window always shows a progress bar.

StatusItem Object Commands

.close v2.0.5

Hides the status item (either removes it from the document, or hides the shared status window). If you do not explicitly call this command before your macro completes, it will be called automatically when your macro is finished.

.updateMessage message v2.0.5

Updates the text message displayed to the user in the status item.

.updateProgress percentDone v2.0.5

If the status item was configured to display a progress bar, updates how full that bar appears. The given percent should be a value between 0 and 100, inclusive.


Previous Chapter
Macro Object
<<  index  >>
 
Next Chapter
Document Object