CyberGlitch Posted March 17, 2004 Share Posted March 17, 2004 Before I start to think of a good way to do this thought I would ask to see if anyone as done something simular. Looking for 2 functions. 1) That will log the pixels of a given area. Like Call log(0,0,10,10,$file) This will log all the pixels in the 10x10 square starting at 0,0 and ending at 10,10. 2) Be able to find the logged pixels in a certain area or on the current screen. Also would be nice to have a percentage matching so it can be tweaked on a usage basis. Call findpixels(0,0,100,100,$file,75) Would search in a 100x100 square starting at 0,0 and ending at 100,100 for the precious log and match it to a 75% accuracy. Then given me back the x,y x,y cords for the area that matched. Bueller? Anyone? or should I get coding now? or is something like this even feasable? Just thought about it last night with some webpage macros and possable photoshop macros. Think this would come in handy for me. Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 but wouldn't it be possable to log pixels and then match them back up. Like find pixels colors 10 11 12 in that order on the screen and then see if 15 16 17 match under 10 11 12 in that order as well? I'm thinking it would be to resource intensive but thought I would ask anyways. Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 Thats what I was affraid of. Well guess this would be a great way to learn v3 in and out and give me something to do in my spare time at work. Fun! Link to comment Share on other sites More sharing options...
insanepyrokid Posted March 17, 2004 Share Posted March 17, 2004 post the code if you figure it out! Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 Ok insanepyrokid, I did my half how about yours? The logging is done now you work on the matching the log up to whats currently on the screen. Although I'm sure some of the code will be changed while making the matching part. Func LogPix($startX, $startY, $endX, $endY, $pixLog) For $countY = $startY To $endY For $countX = $startX To $endX $var = PixelGetColor( $countX, $countY ) IniWrite($pixLog, "Y " & $countY, "X" & $countX, $var) Next Next EndFunc Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 Thats what I just thought about while seeing how long it took to just log a 100x100 square. Going to see if I can write it either to a string or an array. Thinking maybe a string and then try to match the string to another string, which would be the current screen. Was thinking a log file at first so I could log and save the pixels I want to search for latter and not necesarly in just this one macro. Lots of thinking and playing till I see what works best and would be easiest. Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 17, 2004 Administrators Share Posted March 17, 2004 Now it's all in my head... jerk... so I'll have to code it tonight... frazza mutha fuzza gah dah sumbiya fugga Dangerous stuff this programming... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 Sorry, thats what happened to me last night. It popped in my head and I went to sleep with code on my head of how to do it. Had to force myself to go to sleep instead on turning the computer on. Now I'm at work and plenty of free time on my hands. I'm still fairly new to AutoIT but do learn extremly fast from others examples. Link to comment Share on other sites More sharing options...
CyberGlitch Posted March 17, 2004 Author Share Posted March 17, 2004 WOW! Thats all I gotta say, WOW I bow down before you! 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