Jump to content
Sign in to follow this  
0000

PixelGetColor don't work

Recommended Posts

0000

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?

Share this post


Link to post
Share on other sites
Valuater

Yepper, "PixelGetColor don't work"

You should trash Autoit!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
0000

Forgive me for wrong section I'm new here..

Thanx for help :)

Share this post


Link to post
Share on other sites
0000

OK i found another problem. Script is checking program 1 time for Pixel's. How I can edit this script that it will check Program from script begining in every 30 minutes ?

Share this post


Link to post
Share on other sites
corz

If you post the code again, except properly indented, and inside autoit tags..

; some autoit code here

More people will look at it.

;o)

(or


nothing is foolproof to the sufficiently talented fool..

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  

×