Sign in to follow this  
Followers 0
Death

Pixel Help

22 posts in this topic

#1 ·  Posted (edited)

I want the script to do the following

MouseClick("Left", 313, 464, 1, 5)
Sleep(100)

When the greenbox in this screenshot goes the color it now is. I'm referring to the top not the bottom one. I tried looking at the color under mouse tab on autoit window info, but the color keeps changing so i don't know which one it is.

Posted Image

Edited by Death

Share this post


Link to post
Share on other sites



Btw, the bottom Box with a tick in the screenshot is the color before it goes green.

Share this post


Link to post
Share on other sites

Is it a mule trade?

Share this post


Link to post
Share on other sites

Is it a mule trade?

Nah I'm making a stacking script, for the paladin when wearing hoj or dragon. When you run the script you hit a button, ill set that later and the side the script is running on will drop the torch in the trade window, wait for the other trader to hit accept then it will hit accept, i just don't want it to hit accept and the other trader hasn't hit his, it could turn bad >.<

Share this post


Link to post
Share on other sites

Oh... So take a screen-shot of the trade as you did and get the color (better relatively) using PixelSearch, like:

Do
    Sleep(50)
    PixelSearch(500, 400, 564, 464, 0x186408, 10, 2, $hDiablo)
Until Not @error

MouseClick(...)

Share this post


Link to post
Share on other sites

Oh... So take a screen-shot of the trade as you did and get the color

:D How did i not think of that.

Share this post


Link to post
Share on other sites

Ok so i got the Color, Exact Location I Want To Check For The Color

GreenBox Color 0x18480C
GreenBox Coord 430, 298

I don't know, if i should scan on that exact spot or around the coord, like the hole box, Also i need help getting the, left, right, top, bottom to scan the area. So to sum up, i just want the script to scan around the greenbox area for the color above, then when it changes go on with

MouseClick(...)

I just don't know how i'd make the script wait until some where in the greenbox turned 0x18480C , Thanks.

Share this post


Link to post
Share on other sites

It's not exact science, you can get the ~~~~ left, top, right, bottom and check it's pixel checksum. First You need an initial checksum value prior to entering the loop to compare it against. The rest is similar.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

That is why I said use it relatively. You can specify in the last parameter a window handle so it's possible to do all the things relatively without taking care where it would be on the screen. You'll need to look at the help file under the Opt function to change the PixelCoordMode option.

For example, you can take your window to the 0,0 coordinate and preform all the calculation there and then use the same coordinates but using the last parameter set to the window handle of Daiblo. It's not an exact science. ;]

Edited by Authenticity

Share this post


Link to post
Share on other sites

That is why I said use it relatively. You can specify in the last parameter a window handle so it's possible to do all the things relatively without taking care where it would be on the screen. You'll need to look at the help file under the Opt function to change the PixelCoordMode option.

For example, you can take your window to the 0,0 coordinate and preform all the calculation there and then use the same coordinates but using the last parameter set to the window handle of Daiblo. It's not an exact science. ;]

Ok, but wouldn't the handle need the full title ex Diablo II, no just Diablo for what your saying to work?

Share this post


Link to post
Share on other sites

There is AutoIt Window Info for that or use the _GetHWNDFromPID() function from the F.A.Q thread.

Share this post


Link to post
Share on other sites

Bump, idk if this allowed.

Share this post


Link to post
Share on other sites

It's allowed.. after 24 hours..

And no, you're searching nothing because rectangle is 0x0 pixels on location 0,0 and you're missing a parameter too.

Share this post


Link to post
Share on other sites

Legal Bump.

Share this post


Link to post
Share on other sites

Bump...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0