#22414
LTT
Participant

Hello Yutaka,

Patrick C mentioned the macro I wrote here:
https://www.emeditor.com/forums/reply/22295/
https://www.emeditor.com/forums/topic/macro-menu-toggle-runs-at-events-option-for-macros/

So let me explain further what we need with the reason why I wrote that macro:

I use some of the event-driven macros not permanently, but momently. When the job is finished, I turn the macro(s) off.
If one wants to turn such macros on and off quite often, or to switch among them quickly, the “Customize Macros” dialog is inconvenient.
Moreover, in the dialog, one can not tell the event-driven macros from the others, or tell their status, with a glance.

So I wrote the macro. It lists only the event-driven macros in a menu. Clicking in the menu toggles the [Runs at Events] option for the relevant macro. Checked or unchecked. Clear and easy.
The menu is persistent, till the user closes it.

The macro is not “running a macro within a macro”. It just reads/writes e.g. “Events0” for “Macro0” using GetProfileInt/WriteProfileInt methods.

It’s really a pity to lose this unique benefit.
Please consider making a better solution so that users can still achieve it via macros at least.
Thank you.

+ Further thought:
Or how about adding a “Run at Events” command in the right-click menu of “My Macros List” menu:
In “Customize Macros” dialog, we select events for a macro to make it event-driven.
Then in “My Macros List” menu, we can toggle the [Runs at Events] option for the macro with this command in its right-click menu.
This command should be designed to only work for the macros that have events.
And in “My Macros List” menu, such a macro is checked to indicate that it is running at events.
(But I think my macro is better than this solution.)