I already tried to use that red circle to detect different pixel colors and click on that tab but this only works when I have 20 tabs (as I set my coordinates those correspond to red pixels for 20 tabs)
Is there a way to make this code responsive to the tab count? Or any other way to trigger tab activation?
Code: Select all
Loop,
{
PixelGetColor, tab1, 39, 28, RGB
Sleep, 25
if tab1 = 0xF36654
{
Click, 39, 28
...
tab1 = 0
}
PixelGetColor, tab2, 122, 28, RGB
Sleep, 25
if tab2 = 0xF36654
{
Click, 122, 28
...
tab2 = 0
}
PixelGetColor, tab3, 205, 28, RGB
Sleep, 25
if tab3 = 0xF36654
{
Click, 205, 28
...
tab3 = 0
}
PixelGetColor, tab4, 288, 28, RGB
Sleep, 25
if tab4 = 0xF36654
{
Click, 288, 28
...
tab4 = 0
}
PixelGetColor, tab5, 371, 28, RGB
Sleep, 25
if tab5 = 0xF36654
{
Click, 371, 28
...
tab5 = 0
}
... //this goes on for 20tabs
}