WinMenuSelectItem not working with OneNote

Get help with using AutoHotkey and its commands and hotkeys
omareg94
Posts: 86
Joined: 27 Jun 2016, 22:46

WinMenuSelectItem not working with OneNote

06 Jan 2017, 12:20

I'm trying to set a keyboard shortcut for Blue-Gray color and Red color buttons on OneNote.
Image

A method to get this is to use Alt Menu Key-Sequence and send the specific keystrokes for the aimed menu button.
Example for a shortcut to the Blue-Gray color (7 keys are pressed = seven steps):

Code: Select all

^!b::!hfc{Down}{Left 2}{Enter}
The delay is about 1 or 2 seconds due to this.
Steps can be increased for other colors or buttons as the number of keys pressed increases.

hunter99

What I'm looking for is to make it a single step with something like WinMenuSelectItem.
I've tried it but it seems that it's not working on OneNote.
Example not working on OneNote

Code: Select all

^!b::
WinGetActiveTitle, aaa
WinMenuSelectItem, %aaa%, , File, Open
Last edited by omareg94 on 15 Jan 2017, 18:05, edited 2 times in total.
Guest

Re: WinMenuSelectItem not working with OneNote

06 Jan 2017, 12:43

WinMenuSelectItem.htm#Remarks wrote:This command will not work with applications that use non-standard menu bars...
hunter99
Posts: 128
Joined: 20 Jan 2014, 17:57

Re: WinMenuSelectItem not working with OneNote

06 Jan 2017, 16:33

Hi omareg94,
Because it is not a standard windows menu. It might be the new ribbon type that is now being used a lot.
See remarks in the help for WinMenuSelectItem.
This command will not work with applications that use non-standard menu bars. Examples include Microsoft Outlook and Outlook Express, which use disguised toolbars for their menu bars. In these cases, consider using ControlSend or PostMessage, which should be able to interact with some of these non-standard menu bars.
Also see
Alt Menu Search.ahk
by lexikos here http://ahkscript.org/boards/viewtopic.php?f=6&t=8085

hunter99
Edit:
Also I don't think you need the % signs in the WinTitle.

Return to “Ask For Help”

Who is online

Users browsing this forum: 4k3or3et, AHKStudent, Bing [Bot], boiler, Clemens375, davehotkeys, doubledave22, elbeau, Google [Bot], nacken012 and 54 guests