Jump to content

PixelGetColor don't work


0000
 Share

Recommended Posts

Ok I got created program that it will shutdown PC then spot color code on x,y:

While 1
$msg = GUIGetMsg()
If WinExists("Program") then
If PixelGetColor( 500 , 345 ) = 0x292929 then      / first test /
WinClose("Program")                 / here need Program or Program.exe ?/
WinWaitClose("Program")
Sleep(60000)
Send("!{F4}")
Sleep(9000)
Send("U")
EndIf
If PixelGetColor( 438 , 707 ) = 0x52FFBD Or PixelGetColor( 425, 700 ) = 0x00E794 then
Sleep(180000)                    / wait before second test /
EndIf
If PixelGetColor( 438 , 707 ) = 0x52FFBD Or PixelGetColor( 425, 700 ) = 0x00E794 then /second test /
WinClose("Program")
WinWaitClose("Program")  
Sleep(60000)
Send("!{F4}")
Sleep(9000)
Send("U")   
EndIf 
EndIf
WEnd

script not killing Program and dont shutdown pc.. what's wrong?

Link to comment
Share on other sites

  • Moderators

Yepper, "PixelGetColor don't work"

You should trash Autoit!

8)

:)

@OP

Wrap your Search + Value to find in parenthesis.

If (PixelGetColor( 500 , 345 ) == 0x292929) Then

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...