Jump to content
Sign in to follow this  
jimmer

PixelColor Problems!

Recommended Posts

Hello, I have been trying to make Autoit do certain commands after detecting a pixel color.

I have tried everything! and I can't even get the most simple of commands!

I would be very happy if someone helped me with this

Sleep(500)

$PixelColor = 16777251
$i = 0

$xpos = 874
$ypos = 254

While $i = 0

If ($pixelcolor == PixelGetColor($xpos,$ypos)) Then  

MouseMove(874, 254, 50)
   
   $i = 1
Endif

Wend

x 874 and y 254 are white for sure when I run the script.

Share this post


Link to post
Share on other sites

Hello, I have been trying to make Autoit do certain commands after detecting a pixel color.

I have tried everything! and I can't even get the most simple of commands!

I would be very happy if someone helped me with this

Sleep(500)

$PixelColor = 16777251
$i = 0

$xpos = 874
$ypos = 254

While $i = 0

If ($pixelcolor == PixelGetColor($xpos,$ypos)) Then  

MouseMove(874, 254, 50)
   
   $i = 1
Endif

Wend

x 874 and y 254 are white for sure when I run the script.

<{POST_SNAPBACK}>

Hello i hope This Help you Out to learn from it! :idiot:

Sleep(3000) 
$RepeatWhile = 0 
While $RepeatWhile <= 10 
$coord = PixelSearch(130,205,640,538,0xA54119) 
if NOT @error then 
MouseClick("left", $coord[0], $coord[1]) 
else 
MsgBox(0, "PixelSearch failed.", "Error", 0) 
endif 
$RepeatWhile = $RepeatWhile + 1 
Sleep(5000) 
WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...