The problem with my script is that it always executes same command: if box is unchecked checks it but if it is checked it unchecks checked box instead of moving and checking other one.(I hope it makes sence).
Here is my script:
Code: Select all
#Singleinstance force
ifWinNotActive ahk_exe Adobe Premiere Pro.exe
goto monoEnding
juoda = 0xE8E8E8
pilnas = 0xB9B9B9 ;checked box color
tuscias = 0x1D1D1D ;uncheked box color
#IfWinActive ahk_exe Adobe Premiere Pro.exe
^F13::
BlockInput, MouseMove
BlockInput, On
CoordMode, Mouse, screen
CoordMode, Pixel, screen
MouseGetPos, xpos, ypos
send, +g
sleep 500
MouseMove, 1700, 1075, 0
sleep 100
PixelGetColor colorrr, 1705, 1080 RGB
bandomdar:
if (%colorrr% = juoda)
{
goto tesiam
}
else
{
goto bandomdar
}
tesiam:
MouseMove, 1365, 507
PixelGetColor, kolor, 1363, 510
if (%kolor% = pilnas)
{
sleep 100
MouseMove, 1340, 508
sleep 100
click
sleep 100
sendinput, {enter}
}
else if (%kolor% = tuscias)
{
click
sleep 100
sendinput, {enter}
sleep 100
}
pabaiga:
CoordMode, Mouse, Screen
MouseMove, %xpos%, %ypos%
blockinput, MouseMoveOff
BlockInput, off
monoEnding:
return