thx for the help!
Code: Select all
#Persistent
SetTimer, Cura, 500
Return
Cura:
Sleep,10
PixelGetColor, Color,346, 44
If color = 0x0A0B0F
{
Send {F1}
}
Return
Code: Select all
#Persistent
SetTimer, Cura, 500
Return
Cura:
Sleep,10
PixelGetColor, Color,346, 44
If color = 0x0A0B0F
{
Send {F1}
}
Return
Code: Select all
#Persistent
key := {0x0A0B0F: 1, 0x0A0B0E: 2, 0x0A0B0D: 3, 0x0A0B0C: 4} ; Blue, green, red
SetTimer, Cura, 500
Cura:
PixelGetColor, color, 346, 44
Send % key.HasKey(color) ? "{F" key[color] "}" : ""
Return
not working and i need 4 other cords not only 4 colorsmikeyww wrote: ↑13 Apr 2021, 19:16Code: Select all
#Persistent SetTimer, Cura, 500 Cura: PixelGetColor, thisColor, 346, 44 For cNum, color in [0x0A0B0F, 0x0A0B0E, 0x0A0B0D, 0x0A0B0C] ; Blue, green, red Send % thisColor = color ? "{F" cNum "}" : "" Return
Code: Select all
#Persistent
Pixels := [{c: 0x0A0B0F, x: 346, y: 44}, {c: 0x000000, x: 400, y: 50}, {c: 0xFFFFFF, x: 450, y: 60}, {c: 0xA0A0A0, x: 500, y: 70}]
SetTimer, Cura, 500
return
Cura:
for Each, Pixel in Pixels
{
PixelGetColor, PixCol, Pixel.x, Pixel.y
if (PixCol = Pixel.c)
Send, {F1}
}
return
when i open says missing a }boiler wrote: ↑14 Apr 2021, 06:30@doomeyes2 - I believe the code below does what you're asking. Of course you need to change the c, x, and y to be what you want for each of the four pixels. It assumes the colors are in BGR as your original script does. If you want to specify them in RGB, then add , RGB to the end of the PixelGetColor line.Code: Select all
#Persistent Pixels := [{c: 0x0A0B0F, x: 346, y: 44}, {c: 0x000000, x: 400, y: 50}, {c: 0xFFFFFF, x: 450, y: 60}, {c: 0xA0A0A0, x: 500, y: 70}] SetTimer, Cura, 500 return Cura: for Each, Pixel in Pixels { PixelGetColor, PixCol, Pixel.x, Pixel.y if (PixCol = Pixel.c) Send, {F1} } return
Code: Select all
#Persistent
Pixels := [{c: 0x0A0B0F, x: 346, y: 44}, {c: 0x000000, x: 400, y: 50}, {c: 0xFFFFFF, x: 450, y: 60}, {c: 0xA0A0A0, x: 500, y: 70}]
SetTimer, Cura, 500
return
Cura:
for Each, Pixel in Pixels
{
loop
{
PixelGetColor, PixCol, Pixel.x, Pixel.y
if (PixCol != Pixel.c)
Send, {F1}
Sleep, 50
} until (PixCol = Pixel.c)
}
return
F1::Pause ; press F1 to play/pause
this one
Code: Select all
#Persistent
Pixels := [{c: 0x0A0B0F, x: 346, y: 44}, {c: 0x0B0D10, x: 32, y: 45}, {c: 0x0A0B0F, x: 342, y: 45}, {c: 0x0A0C0F, x: 328, y: 63}]
SetTimer, Cura, 500
return
Cura:
for Each, Pixel in Pixels
{
PixelGetColor, PixCol, Pixel.x, Pixel.y
if (PixCol = Pixel.c)
Send, {F1}
Users browsing this forum: No registered users and 96 guests