glix Posted January 23, 2007 Share Posted January 23, 2007 Func gather() $color = PixelGetColor(302, 228) $keycolor = PixelGetColor(107, 418) If $color = 0xFFFBD6 Then Send("b") Sleep(150) Send ("a") sleep(1050) if $keycolor = 0x311400 then ;if 0x311400 is in the designated pixel it still will not move the mouse nor click it MouseMove (116, 411) Sleep (300) MouseDown ("left") Sleep (300) Mousemove (343, 236) Sleep (300) MouseUp("left") Sleep (300) Send ("d") else Send ("d") Sleep (250) EndIf Endif EndFunc ;==>gather Link to comment Share on other sites More sharing options...
BigDod Posted January 23, 2007 Share Posted January 23, 2007 PixelGetColor returns decimal values not hex. 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 Link to comment Share on other sites More sharing options...
glix Posted January 23, 2007 Author Share Posted January 23, 2007 (edited) well the first part of the script works fine and the color is in hex, but after "if $keycolor = 0x311400 then" it does not work but ill switch them with decimals and see what happens Edited January 23, 2007 by glix Link to comment Share on other sites More sharing options...
glix Posted January 23, 2007 Author Share Posted January 23, 2007 i got it Func gather() $color = PixelGetColor(302, 228) $keycolor = PixelGetColor(118, 414) If $color = 16776150 Then Send("b") Sleep(150) Send ("a") sleep(1050) elseif $keycolor = 8666145 then MouseMove (118, 414) Sleep (1000) MouseDown ("left") Sleep (1000) Mousemove (343, 236) Sleep (1000) MouseUp("left") Sleep (1000) Send ("d") Sleep (250) Endif EndFunc ;==>gather Link to comment Share on other sites More sharing options...
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