Grayed-out menu item

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Lem2001
Posts: 127
Joined: 27 Jun 2017, 17:59

Grayed-out menu item

Post by Lem2001 » 21 Jul 2023, 22:53

Is it possible to determine whether a menu item is grayed-out or not and then act accordingly? (i.e. perform Action 1 if the specified menu entry is not grayed out, or Action 2 if the specified menu item is grayed-out / disabled).

By the way, I'm talking about standard application menus and context menus, not menus that were created using AHK.

Thanks

User avatar
Hellbent
Posts: 2114
Joined: 23 Sep 2017, 13:34

Re: Grayed-out menu item

Post by Hellbent » 22 Jul 2023, 03:33


Lem2001
Posts: 127
Joined: 27 Jun 2017, 17:59

Re: Grayed-out menu item

Post by Lem2001 » 23 Jul 2023, 01:57

ControlGet does not work for individual menu entries (or at least I don't know how to use it for that). In fact Window Spy doesn't even show a control for a whole menu or context menu (never mind an individual menu entry) so there is no control id to check in the first place.

An alternative method seems to be required (I dunno, maybe using com or something) but that kind of thing is well beyond my pay grade.

Post Reply

Return to “Ask for Help (v1)”