what Im looking for is to run the script on the window title bar
actually I would like to long press RButton for Win+Ctrl+T combination.
the idea is that when I hold the RButton on title bar of the window, lets say for 3 secs, the script preform the job.
for this I found several scripts as parts for the whole script
_____
1) long pressing the key (here a guy wanted to replace letter with another on holding the key)
Code: Select all
$*c::
Send {Blind}{c}
KeyWait, c, T0.5
If ErrorLevel {
Send {BackSpace}{ç}
KeyWait, c
}
return
Code: Select all
CoordMode, Mouse, Screen
$RButton::
MouseGetPos, xPos, yPos, WindowUnderMouseID
WinGetClass, class, ahk_id %WindowUnderMouseID%
SendMessage, 0x84, , ( yPos << 16 )|xPos, , ahk_id %WindowUnderMouseID%
If (class <> "Shell_TrayWnd") and (ErrorLevel = 2)
Msgbox, You right clicked in the title bar
Else
Click Right
Return
according to feedback those scripts work well, but for me I don't know how to combine it for the desired result
or maybe the solution might be even lighter on code amount
the Win+ctrl+T is a combination of MS Power Toys to make the window "On Top"
but I would like to pin window On Top by easier combination ( long RButton, because we very rare hold RButton for more than 1 sec)
please any help appreciated