- August 31, 2017 at 10:49 am #22336Patrick CParticipant
I’m trying to write a macro to enable / disable another macro’s “Runs at Events” setting.
I suspect that this might have something to do with the following key:
in Computer\HKEY_CURRENT_USER\Software\EmSoft\EmEditor v3\Common
However, accessing a binary key is not possible with GetProfileInt / GetProfileString
I’d highly appreciate any tips / ideas
Thanks in advance
PatrickAugust 31, 2017 at 1:59 pm #22337Yutaka EmuraKeymaster
“CWP” is NOT related to macros.
Currently, there is no way to enable/disable another macro’s “Runs at Events” settings, unfortunately. I am not sure why you need to enable/disable another macros’ event settings. Maybe, you might want to explain why, and I might think about workarounds.
Thanks,September 1, 2017 at 3:19 am #22346Patrick CParticipant
To be honest: Because I’m lazy.
I’d like to have a Runs at Events on/off button → 1 mouse click required
Presently it take 4 mouse clicks to turn an event on and off.
As I have to do this often, it does make a difference
I don’t urgently need this – its more like a “very nice to have” convenience feature.
Thank you for your great support!
PatrickSeptember 11, 2017 at 5:13 am #22414LTTParticipant
Patrick C mentioned the macro I wrote here:
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.
+ 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.)
- You must be logged in to reply to this topic.