Archman 0 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? Share this post Link to post Share on other sites
Helge 3 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. Share this post Link to post Share on other sites
BigDod 518 Posted January 20, 2007 Try $health = PixelGetColor( 417 , 25 ) If $health = Dec("D63839") Then Beep ( 37 , 1000 ) EndIf Hide BigDod's signature Hide all signatures 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 Share this post Link to post Share on other sites
Archman 0 Posted January 20, 2007 Nice One Thx Guys Share this post Link to post Share on other sites