Jump to content

WinGetPos/Pixel Search


Recommended Posts

Ok well, the window im working can move. I can move the program around that id be pixel searching.

So Id use WinGetPos, the problem is Im trying to pixel search in a area, but the program can be moved. So that messes up the corrs. is there any way to pixel search the window in that spot, and still move the window?

If Anyone could help that would be great.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Thanks tons, again lol. I missed that in the help file.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Ah, crap I hate to ask this, but could you give a example? I want pixel search to search the client for a color in a "x,y" but since the window can be moved it's not standard the x,y corrs.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

I don't know how to explain what I need done I guess. No offense to you. None of those scripts really help me.

I'll try to re explain.

The client im using is windowed. So you can move the client around. Thus, it changes the corrs. when the screen is moved. So if the points are at 434/234 that im looking for in the client, then you move the client window, then the corrs would change. So I wanted to know how to pixel search for a color taking into account that the corrs. for the rectangle it searchs would move when you move the client window. So there needs to be a offset in a sense. Im really not sure how to go about doing something like this. If anyone could help me that would be great.

PixelSearch( 0, 0, 20, 300, 0x319AFF ) but I need to take into the fact that anyone can move the client, so I need offsets or something.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Thats it? Im sorry to sound stupid but Im missing something, I need it to look in the client at a certin spot for the colors. Well how am I suppose to get corrs for it, if I move the client it self then it all changes.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Local $pos = WinGetPos("Darkages")

then maybe add the

PixelSearch( 0, 0, 20, $pos[0] + 310, 0x319AFF )

Im not sure.... really confused..

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

I've looked at them, I have a feeling they are useful but im missing how it would help in my case.

$isActive = WinWaitActive("Darkages - Windowed by Eru")

While 1

If $isActive Then
        Local $pos = WinGetPos("Darkages")
        If IsArray($pos) Then
        $coord = PixelSearch( 0, 0, $pos[0] + 310, $pos[1] + 163, 0x319AFF )
                Sleep(25)

WEnD

Would this work or.... this is my sad attempt at what I think needs to be done.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Ok maybe some screen shots will help. I have the mouse in the same spot. Thats where I want it to pixel search, in that general area. Then I move the client, the corrs. change. I can't have it pixel search the whole area of the screen, it needs to be by the little blue bar.

Posted Image

Posted Image

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

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...