Death Posted April 10, 2009 Share Posted April 10, 2009 (edited) I want the script to do the followingMouseClick("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. Edited April 10, 2009 by Death Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 Btw, the bottom Box with a tick in the screenshot is the color before it goes green. Link to comment Share on other sites More sharing options...
Authenticity Posted April 10, 2009 Share Posted April 10, 2009 Is it a mule trade? Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 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 >.< Link to comment Share on other sites More sharing options...
Authenticity Posted April 10, 2009 Share Posted April 10, 2009 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(...) Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 Oh... So take a screen-shot of the trade as you did and get the color How did i not think of that. Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 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. Link to comment Share on other sites More sharing options...
Authenticity Posted April 10, 2009 Share Posted April 10, 2009 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. Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 So something like this. $example = PixelChecksum(0,0, 0, 0) While $example = PixelChecksum(0,0, 0, 0) Sleep(100) WEnd MouseClick(...) Still like to know how i can find the left right top bottom Link to comment Share on other sites More sharing options...
Authenticity Posted April 10, 2009 Share Posted April 10, 2009 (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 April 10, 2009 by Authenticity Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 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? Link to comment Share on other sites More sharing options...
Authenticity Posted April 10, 2009 Share Posted April 10, 2009 There is AutoIt Window Info for that or use the _GetHWNDFromPID() function from the F.A.Q thread. Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 Well i made this I have no clue where it came from Opt("PixelCoordMode", 2) If PixelSearch(0,0,0,0,0x18480C,20,,0x00620414) MouseClick(...) Else While 1 Sleep(100) WEnd EndIf Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 Well i made this I have no clue where it came from Opt("PixelCoordMode", 2) If PixelSearch(0,0,0,0,0x18480C,20,,0x00620414) MouseClick(...) Else While 1 Sleep(100) WEnd EndIfSo is this on the right track? Link to comment Share on other sites More sharing options...
Death Posted April 10, 2009 Author Share Posted April 10, 2009 Bump, idk if this allowed. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2009 Developers Share Posted April 10, 2009 next bump within 24 hour will get this topic locked. SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
BlackDragonBE Posted April 10, 2009 Share Posted April 10, 2009 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. Link to comment Share on other sites More sharing options...
Death Posted April 11, 2009 Author Share Posted April 11, 2009 Legal Bump. Link to comment Share on other sites More sharing options...
Death Posted April 11, 2009 Author Share Posted April 11, 2009 Just came up with this. Global $Go Opt("PixelCoordMode", 2) While $Go = 1 If PixelSearch(0,800,640,800,0x18480C,20,,0x00620414) Then MouseClick("Left", 313, 464, 1, 5) Sleep(100) Else Sleep(100) $Go = 1 EndIf WEnd Doesn't work tho Link to comment Share on other sites More sharing options...
Death Posted April 13, 2009 Author Share Posted April 13, 2009 Bump... Link to comment Share on other sites More sharing options...
Recommended Posts