How to get the number of actions inside a macro? Top level as well as nested macros

Hello,

I am trying to shrink my macros downs so that i can maintain and improve them faster over time but
I cannot do that unless I know how many actions my macro currently has.
Is there a way to get the count vs counting all the actions?

Ben

Give this a try:

Count the Number of Actions in the Selected Macro v1.00.kmmacros (6.5 KB)

Thankyou so much that really helps.
My rust enums macro was 177. Now its 176. :slight_smile: On my way to drop it alot more.

Thanks again

Is there any chance you can allow us to change a setting where it doesn't include deactivated nodes and comments in the count?

Sometimes I can't take out the comment action or the original actions that are now deactivated until the new version is fully working .

Nyet. I've done as much as I have time for.

All I'm doing is parsing the XML of the macro, so you're quite welcome to do your own detective work and figure out how to do what you want.

I just looked, and it would seem that deactivated actions have this tag:

<key>IsActive</key>
<false/>

Activated actions have NO tag.

You can get the XML of a macro via the Edit > Copy As > Copy As XML menu.

Enjoy.