Other Commands

Sleep seconds v2.0

Has the macro do nothing (remain idle) for at least the given number of seconds. During the sleep period the macro is paused (ie: subsequent macro commands are delayed), but normal user interaction with Nisus Writer may continue (ie: sleeping does not block the user interface). The wait is guaranteed to last at least the given number of seconds, but may last slightly longer. Once the time expires, macro commands resume as normal.

Encode RTF text

Converts the given text object (ie: formatted text) and returns fully formed RTF as a Data object.

Decode RTF rtfData

Returns the textual contents described by the given RTF data.

Insert Merge Placeholder name v1.1

Inserts a document merge placeholder for a field/property with the given name.

Localize string v1.0.1

Translates the given English string into the language the user is currently using to run the application. If no translation for the string is available, returns the original English string with no changes.

Note: this translation is limited to only strings found in the “localizable.strings” file found in the application bundle. That file does not contain all menu command names, which makes the Localize command not very useful.

Refresh Macro Menu v1.0.2

Refreshes all the entries on the Macro menu, adding and removing them to account for changes in the file system. Invoking this command is not necessary unless you programmatically add/remove macros.

Glossary Enabled fileName v2.0

Returns @true if the given glossary file exist and is enabled (expansions occur), otherwise @false. The file name should be given without an extension (ie: “.ngloss”)

Set Glossary Enabled fileName, isEnabled v2.0

Changes whether the given glossary file is enabled (expansions occur). The file name should be given without an extension (ie: “.ngloss”)


Previous Chapter
UI Interactions
<<  index  >>
 
Next Chapter
Perl Code