glix 0 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 Share this post Link to post Share on other sites
BigDod 518 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 Share this post Link to post Share on other sites
glix 0 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 Share this post Link to post Share on other sites
glix 0 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 Share this post Link to post Share on other sites