I've tried every combination I can think of under this menu selection script help:
https://www.autohotkey.com/docs/commands/WinMenuSelectItem.htm
This is the window I'm trying to select menu items from:
This is the "Active Window Info":
Here is the script header:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance,Force ;Only launch 1 instance of this script
#Persistent ;Will keep it running...
; Alt key is ! the Windows key is # , the Shift key is + , and Control key is ^
return ;stop going forward (I tried it with and without this line)
I also tried all of these with another menu item: "Mark, Mark In" Because I noticed the "new" would turn blue after I typed it.
Code: Select all
^p::
WinMenuSelectItem, DaVinci Resolve by Blackmagic Design - 17.0.0, , File, New Project
return
^p::
WinMenuSelectItem, ahk_class Qt5QWindowIcon, , File, New Project
return
^p::
WinMenuSelectItem, WinActivate %davinci%, , Mark, Mark In
return
^p::
WinMenuSelectItem, ahk_exe Resolve.exe, , File, New Project
return
^p::
WinMenuSelectItem, DaVinci Resolve by Blackmagic Design - 17.0.0, , 1&, 2&
return
^p::
WinMenuSelectItem, WinTitle DaVinci Resolve by Blackmagic Design - 17.0.0, , 1&, 2&
return
I did like another 40 variations. Nothing seems to get Control P to select a menu item in DaVinci Resolve's Primary Window. The window is also called: Generic PnP Monitor 1.
I tried using this to find the Window ID:
Each window or control has a unique ID, also known as a HWND (short for handle to window). This ID can be used to identify the window or control even if its title changes. The ID of a window is typically retrieved via WinExist() or WinGet. The ID of a control is typically retrieved via ControlGet Hwnd, MouseGetPos, or DllCall(). Also, ahk_id will operate on controls even if they are hidden; that is, the setting of DetectHiddenWindows does not matter for controls.
Don't know what to put between () to get the line to work
I'm assuming window class won't work, because I have a two monitor set up with two identical monitors.
What Am I missing?