why this code doesn't send f7 to the Monitor? what am i doing wrong?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ender Hugin
Posts: 1
Joined: 21 Dec 2019, 18:45

why this code doesn't send f7 to the Monitor? what am i doing wrong?

Post by Ender Hugin » 31 Mar 2023, 00:06

Code: Select all

	

	#singleinstance, force
	#WinActivateForce

	DetectHiddenWindows, On
	DetectHiddenText, On
	DetectHiddenWindows, on

	SetTitleMatchMode, 1
	settitlematchmode, slow
	setControldelay, 50
	setkeydelay, 50, 0

	Global WhichCTL
	Global WhichCTLid
	Global WhichWinClass

f10::
	ControlGetFocus, WhichCTL, Adobe Premiere Pro -
	ControlGet, WhichCTLid, Hwnd,, %WhichCTL%, Adobe Premiere Pro -
	WinGetClass, WhichWinClass, A
	clipboard = %WhichCTL% id %WhichCTLid% class %WhichWinClass%
return 

f11::
	ControlFocus   , ahk_id 0x450A18 ahk_class ATL:110FA5F0        ,   ahk_class ATL:110E8A60
	controlSendraw , ahk_id 0x450A18 ahk_class ATL:110FA5F0 , !{f7},  ahk_class ATL:110E8A60
	controlSend    , ahk_id 0x450A18 ahk_class ATL:110FA5F0 , !{f7},  ahk_class ATL:110E8A60
	 ; ALT F7
	SendMessage, 0x07,  0x00000000,           ,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; 0x07 = WM_SETFOCUS
	SendMessage, 0x104, 0x00000076, 0x20410001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; WMSYSkeydown
	SendMessage, 0x105, 0x00000076, 0xE0410001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; WMSYSkeyup
	SendMessage, 0x101, 0x00000076, 0xE0410001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; WMSkeyup
	SendMessage, 0x104, 0x00000012, 0x20380001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; WMSYSkeydown
                                                                                                 
	; F7                                                                                         
	SendMessage, 0x100, 0x00000076, 0x20410001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; keydown
	SendMessage, 0x101, 0x00000076, 0xE0410001,  ahk_id 0x450A18 ahk_class ATL:110FA5F0 , ahk_class ATL:110E8A60  ; keyup
return


Post Reply

Return to “Ask for Help (v1)”