Styles2304 Posted February 15, 2008 Share Posted February 15, 2008 Ok I posted a little about this earlier but the topic sort of changed. So now, my question is how do I compare a given field of pixels in order to determine when the crafting process initiated by the macro is complete.I need to find out when this:turns into this:It moves up sequentially so I need to compare 24, 25, 26 and so on and so on until it looks like a 35. Make sense?I also need to test to make sure certain items will work properly. If they DO work properly, their text is green, otherwise, it is white.So, I need to make sure the item looks like this:and not like this:When tested, these items are in the same place and all background and surrounding imagery in the immediate area stays EXACTLY the same.Also, You can't just compare a pixel color . . . because there's no way to click specific enough to guarantee that you will click a green pixel. The cursor is a weird circle with some shape in the middle.Any ideas? Link to comment Share on other sites More sharing options...
James Posted February 15, 2008 Share Posted February 15, 2008 Well you could look in a certain area and read where each colour is, then you can "map" these in variables Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Styles2304 Posted February 15, 2008 Author Share Posted February 15, 2008 (edited) The thing is, that would work for MY setup but I need this to function for my entire guild (the one's I'm writing this for.) Also, the colored text won't always be the same so it needs to be versatile. With that said, maybe what you suggested will work? I don't know. Can you explain a little more or point me towards a tutorial of some sort? Edited February 15, 2008 by Styles2304 Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 I did some searching and I don't have a clue how to accomplish any part of this. Link to comment Share on other sites More sharing options...
Ármányos Kő Posted February 16, 2008 Share Posted February 16, 2008 The thing is, that would work for MY setup but I need this to function for my entire guild (the one's I'm writing this for.) Also, the colored text won't always be the same so it needs to be versatile. With that said, maybe what you suggested will work? I don't know.Can you explain a little more or point me towards a tutorial of some sort?Start the game.Record the colors on the specific spots.Keep checking periodically. When the color is changed, it's time to do what you want to do.It should work on any PC. If positions are different due to different desktop sizes, than do pre measurements and check the locations relevant to a given PC's screen resolution.Looks to me like a giant Select groupping if you have many things to check. Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 What I don't understand is what is meant by "Record the colors on the specific spots" Like take a screen shot and do it that way or what? And what I mean by it might not work for everyone is that the items are located in different spots on every computer. Can someone explain this like I'm a two year or show me enough code that I can understand what you guys are talking about? Link to comment Share on other sites More sharing options...
goldenix Posted February 16, 2008 Share Posted February 16, 2008 spesific spot is 1 pixel for example, search for PixelGetColor in the help file My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 Ok yeah . . . I already tried that approach . . . granted, I need to try it using the shade option, but the bigger problem is distinguishing between the numbers. How can I make PixelGetColor work for that? Link to comment Share on other sites More sharing options...
goldenix Posted February 16, 2008 Share Posted February 16, 2008 the bigger problem is distinguishing between the numbers. How can I make PixelGetColor work for that?If im not mistaking you cant. The simplest thing I can recommend is: lets say you are looking for nr 3 , the nr 3 is clored in blue ( lets say its blue ). now you can look for lets say 6-7 ...blue pixels inside that nr. 3 & outside of nr. 3 for lets say 3 not blue pixels, because nr 3 resembles nr 8 its hard to determine what nr is what othervisewas this explained understandable.? My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 Yeah . . . that makes sense . . . so is there any way period to distinguish between numbers that don't change color? I'm gonna mess with that and see if I can't get it to work for the dud items (it should if I understand correctly) and I'll post back with an update. Thanks for all the help so far. Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 Just something to take into consideration since you were talking about distinguishing between 3's and 8's . . . the 10's place will only be distinguishing between 2 and 3 and 1's place will be distinguishing between 5 and all other numbers. That make sense? Link to comment Share on other sites More sharing options...
goldenix Posted February 16, 2008 Share Posted February 16, 2008 Look at the picture, if all White colored pixels on this picture are Black its Nr 3. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 Ah ok . . . so I think I'm with ya. Just an update, I got it working flawlessly to test for dud items. Thanks . . . you've been a big help. I'll post back with my next attempt once I've completed it. Link to comment Share on other sites More sharing options...
Styles2304 Posted February 16, 2008 Author Share Posted February 16, 2008 Welp, I got it. Took some work but it happened so thank you very much! You guys were a big help. Link to comment Share on other sites More sharing options...
James Posted February 16, 2008 Share Posted February 16, 2008 Are you using arrays? If so I recommend writing to a temporary file Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now