Jump to content

help pls.


Gordon
 Share

Recommended Posts

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

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

that just moves the mouse to the left than clicks in that spot

Are you sure that the colour you are searching for is only going to be in the position that you want it to be.

Edit

You may want to restrict the size of the area that is being searched

Edited 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

Are you sure that the colour you are searching for is only going to be in the position that you want it to be.

Edit

You may want to restrict the size of the area that is being searched

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 1024x768

the 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 by Gordon
Link to comment
Share on other sites

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 1024x768

the 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

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 :P
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...