Archman Posted January 20, 2007 Posted January 20, 2007 Ok i am trying to get the script to Read the color of a pixel from a specific spot on screen. I want it so that if the pixel is color D63839 then the prog beeps. $health = PixelGetColor( 417 , 25 ) If $health = D63839 Then Beep ( [ 37 [, 1000 ]] ) EndIf But when i run the exe and it gets to that line i get If $health = D63839 Then If $health = ^ERROR Error Parsing Function Call. What am i doing wrong? How Should it be written in the script?
Helge Posted January 20, 2007 Posted January 20, 2007 $health = PixelGetColor(417 , 25) If $health = 0xD63839 Then Beep(37, 1000) - Added 0x to color. - Removed square brackets as they are used in the helpfile to show that the parameters are optional. - Made If-statement to a single line as it only contained one function-call.
BigDod Posted January 20, 2007 Posted January 20, 2007 Try $health = PixelGetColor( 417 , 25 ) If $health = Dec("D63839") Then Beep ( 37 , 1000 ) EndIf Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now