Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Script Directives

EmEditor Macro Reference: #status directive

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Directives

#status directive

Specifies the status (whether the macro is enabled and whether it is checked) of the current macro which should mimic the command specified by the ID. The Macros menu and Macros toolbar updates the macro status according to this specified command status. This directive must be specified at the first lines of the script above the main code.

#status = id

Parameters

id

Specifies the integer value of the command ID that is used to query the status. This value is equivalent to the nID parameter of the QueryStatusByID method.

Examples

This macro mimics the Auto Copy command (ID = 3979). The macro menu and toolbar button is checked when the Auto Copy feature is on. The macro menu and toolbar button is not checked when the Auto Copy feature is off.

[JavaScript]

#status = 3979

editor.ExecuteCommandByID(3979);   // 3979 = EEID_AUTO_COPY

[VBScript]

#status = 3979

editor.ExecuteCommandByID 3979   ' 3979 = EEID_AUTO_COPY

Version

Supported on EmEditor Professional Version 16.4 or later.

Copyright © 2003-2021 by Emurasoft, Inc.