Gordon Posted December 31, 2005 Share Posted December 31, 2005 im trying to find out how to get the mouse to move to the position of a pixelsearch here is my script so far any help would be apreciated thanx WinActivate("[CO2.0 Alpha]") WinWaitActive ("[CO2.0 Alpha]") $coord = PixelSearch( 0, 0, 1024, 768, 0x635539 ) Opt("MouseCoordMode", 2) MouseClick("left") all it does so far is gets to the left click in the script and clicks left in that spot I want the mouse to click in the spot that matches the pixel. Link to comment Share on other sites More sharing options...
BigDod Posted December 31, 2005 Share Posted December 31, 2005 Change this line MouseClick("left")to MouseClick("left", $Coord[0], $Coord[1]) 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...
Gordon Posted December 31, 2005 Author Share Posted December 31, 2005 Change this line QUOTE MouseClick("left") to QUOTE MouseClick("left", $Coord[0], $Coord[1])that just moves the mouse to the left than clicks in that spot Link to comment Share on other sites More sharing options...
BigDod Posted December 31, 2005 Share Posted December 31, 2005 (edited) that just moves the mouse to the left than clicks in that spotAre you sure that the colour you are searching for is only going to be in the position that you want it to be.EditYou may want to restrict the size of the area that is being searched Edited December 31, 2005 by BigDod 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...
Gordon Posted December 31, 2005 Author Share Posted December 31, 2005 (edited) Are you sure that the colour you are searching for is only going to be in the position that you want it to be.EditYou may want to restrict the size of the area that is being searchedI aint sure, what im trying to make is a auto graber for a video game that picks up the items droped by the mobs after I kill em.So the location will be diferent almost all the time.the game is full screen 1024x768the pixel search should find the pixel and than left click on it that is what I want to happen,(i.e will pick up the item droped by mobs) Edited December 31, 2005 by Gordon Link to comment Share on other sites More sharing options...
BigDod Posted December 31, 2005 Share Posted December 31, 2005 I aint sure, what im trying to make is a auto graber for a video game that picks up the items droped by the mobs after I kill em.So the location will be diferent almost all the time.the game is full screen 1024x768the pixel search should find the pixel and than left click on it that is what I want to happen,(i.e will pick up the item droped by mobs)You can use the AutoIt Window Info tool to find out what colour the item are, hopefully they are all the same colour. If they are not a unique colour it will be difficult to find them using PixelSearch as it searches from left to right and top to bottom and will stop at the first match. If this does not help you will need someone else to help as I am not into gaming in any way. 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...
Gordon Posted December 31, 2005 Author Share Posted December 31, 2005 You can use the AutoIt Window Info tool to find out what colour the item are, hopefully they are all the same colour. If they are not a unique colour it will be difficult to find them using PixelSearch as it searches from left to right and top to bottom and will stop at the first match. If this does not help you will need someone else to help as I am not into gaming in any way.thanx alot for ur help 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