Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted

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.

Posted

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 ?

Posted

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..

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
×
×
  • Create New...