Jump to content

Small Help


evilelf
 Share

Recommended Posts

I was going to start a small project up, but before i start.

I need to know how to Search For a Pixel at a loction.

It's in a game window, & It must always search the same Spot. No matter what the resolution is set at.

I thought some one might know,.. I know you can do this in C++

Link to comment
Share on other sites

Still no help?

No

I dont want to " WinMove "

I'm Looking for more on the lines " WinGetPos "

I want to some how always minus The PixelSearch.

So no matter where or what size the window is"TheWindowImLookingN",

It can Still Search the Correct Spot.

Please just point me to the right direction, I'll read and search the " AutoIt Help File "

Link to comment
Share on other sites

Maybe something like this; (don't know the function parameters or name)

But try: pixelsearch(@DesktopHeight -/+ , @DesktopWidth -/+,"COLOR")

By -/+ i mean either - or plus a value.

Now do the math :mellow:

I cant do the math :( ,

Cause i dont know were the window is going to be at all the time,..

Its Random.

I need it more like this..

pixelsearch(@GameWindowHeight -/+ , @GameWindowWidth -/+,"COLOR")

Link to comment
Share on other sites

I cant do the math :mellow: ,

Cause i dont know were the window is going to be at all the time,..

Its Random.

I need it more like this..

pixelsearch(@GameWindowHeight -/+ , @GameWindowWidth -/+,"COLOR")

Ok, obviously I am not writing code here, but what about WinGetPos? That should give you the current position of the window you need. If you can get to the point you need by knowing the position, that should help.

Link to comment
Share on other sites

Ok, obviously I am not writing code here, but what about WinGetPos? That should give you the current position of the window you need. If you can get to the point you need by knowing the position, that should help.

Firstly before posting search if what you want exists > bot with pixelsearch

$Winpos=WinGetPos("Wingametitle","")
;for exemple your pixel have coords x=45 and y=60
MouseClick("left",$winpos[0]+45,$winpos[1]+60,1)
Link to comment
Share on other sites

Firstly before posting search if what you want exists > bot with pixelsearch

$Winpos=WinGetPos("Wingametitle","")
;for exemple your pixel have coords x=45 and y=60
MouseClick("left",$winpos[0]+45,$winpos[1]+60,1)
Yes, and No..

Here is a test i did and its Clicking in my window and in the right spot,

But after I stretch the game window, its not clicking the text.

I think I still have to some how minus or pluss the

$Winpos=WinGetPos("*****","")
;for exemple your pixel have coords x=45 and y=60
MouseClick("left",$winpos[0]+476,$winpos[1]+197,1)

Info on Window, Im trying to Search.

Position: 120, 325

Size: 310, 261

Keep in Mind, The Position and Size will change all the time"Random".

Edited by evilelf
Link to comment
Share on other sites

Yes, and No..

Here is a test i did and its Clicking in my window and in the right spot,

But after I stretch the game window, its not clicking the text.

I think I still have to some how minus or pluss the

$Winpos=WinGetPos("*****","")
;for exemple your pixel have coords x=45 and y=60
MouseClick("left",$winpos[0]+476,$winpos[1]+197,1)

Info on Window, Im trying to Search.

Position: 120, 325

Size: 310, 261

Keep in Mind, The Position and Size will change all the time"Random".

Bump...Still need help...

I know do this.

Autoit Window Info,

The Mouse Position is still going by my Desktop Resolution.

How would i get the Pixels of my games Resolution.

Edited by evilelf
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...