Code: Select all
CoordMode, Pixel, Screen
par1 = #9,#8,#7,#6 ; Win11 Tab Hotkey
^left::
PixelSearch, ovx1, ovy, 181, 1024, 1335, 1079, 0xff8b00 , 2, fast rgb ; Find Active Tab via undeline win Color, report position to use below. Use winspy to find color code.
Sleep 100
Wingettitle, LWA1, A
If (ovx1 = 197) ; Use Winspy to get underline pos
Send, #0
If (ovx1 = 397)
Send, #5
If (ovx1 = 597)
Send, #6
If (ovx1 = 797)
Send, #7
If (ovx1 = 997)
{
Send, #8
}
Sleep 50
Wingettitle, LWA2, A
If (LWA1 = LWA2) ; If No Tab Change due to next immediate tab not existing.
{
Loop, parse, par1, `,
{
Send,%A_loopfield%
Wingettitle, PLWA, a
IF (LWA1 != PLWA) ; Stop Cycle when Active win has changed.
{
Break
}
}
}
return
^Right::
PixelSearch, ovx, ovy, 181, 1024, 1335, 1079, 0xff8b00 , 2, fast rgb
Sleep 100
Wingettitle, RWA1, A
If (ovx = 197)
{
Send, #6
return
}
If (ovx = 397)
Send, #7
If (ovx = 597)
Send, #8
If (ovx = 797)
Send, #9
If (ovx = 997)
{
Send, #0
}
Sleep 50
Wingettitle, RWA2, A ;If No Tab Change due to next immediate tab not existing go back to 1st tab.
If (RWA1 = RWA2)
{
Send, #5
}
return