/dev/null Posted May 28, 2005 Share Posted May 28, 2005 (edited) Hi guys,inspired by the following thread Scan for an Image I created my first "larger" AutoIT script. It is not yet "perfect", but a maybe good start.In the thread mentioned above, jorgb told us about a tool called "Zephyr Test Runner", which is able to find a window by searching the whole screen for a picture. Part of this test utility is a tool, that helps to extract those pictures/icons from a screen shot.So, my tool is a clone of that tool. It enables you to extract a selectable rectangle from the screen. This rectangle will be safed to a file and can later be used to find a window on the screen, based on that picture/rectangle. HOWEVER, that code does not yet exist. I know there is something available from Larry, but I thought I'm going to implement this in the AutoIT source code, rather than in the scripting environment. Should be ways faster. Well, we will see if there is enough time to get this going :-))BTW: The script needs the Screen Capture DLL (see the code).BEWARE: If you select a large window, it will take awfully long to get the rectangle, as I had to use PixelGetColor. Using the Capture DLL was not an option, as I need the Pixels in an array and not as BMP or JPEG. However, for small icons it is fast enough.EDIT: Uploaded Version 1.0.1. Will now also save the rectangle to the file partial_capture.bmp in the current working dir. I have not implemented a file selection for this, as this is just for testing purposes (to check if the rectangle was selected correctly)CheersKurtscreenshoter.au3 Edited June 3, 2005 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
jorgb Posted June 3, 2005 Share Posted June 3, 2005 Hi Kurt, Where do I get the DLL? When I run the autoit script I only see a grey area and I am asked to click on the screenshot.. Regards, - Jorgen Link to comment Share on other sites More sharing options...
/dev/null Posted June 3, 2005 Author Share Posted June 3, 2005 Where do I get the DLL? When I run the autoit script I only see a grey area and I am asked to click on the screenshot..Hi Jorgen,it is Lazycats DLL, the URL is in my source code. Here is the link: http://proxru.port5.com/CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
/dev/null Posted June 3, 2005 Author Share Posted June 3, 2005 Hi Jorgen, I just uploaded Version 1.0.1. Pls see EDIT section for changes. Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
LukeP Posted August 11, 2005 Share Posted August 11, 2005 Can anyone tell me where I can find the dll? the link provided is non-existent. Thank you, Luke Link to comment Share on other sites More sharing options...
/dev/null Posted August 11, 2005 Author Share Posted August 11, 2005 Can anyone tell me where I can find the dll? the link provided is non-existent.Thank you,Lukehttp://www.autoitscript.com/forum/index.ph...wtopic=8377&hl=CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
LukeP Posted August 11, 2005 Share Posted August 11, 2005 Fantastic, thank you Kurt.Now I just need to find out how to make the comparison.I.e. I would like a script to run, take screenshots and save them (as rect files) then have another script run, make the same screenshots (and regions) as the ones the user made and then compare between them, report on the percentage of the same pixels...Any other advices how this might be achieved?Thank you,lukehttp://www.autoitscript.com/forum/index.ph...wtopic=8377&hl=CheersKurt<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
/dev/null Posted August 11, 2005 Author Share Posted August 11, 2005 Any other advices how this might be achieved?Nope. I would also do it that way.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
LukeP Posted August 11, 2005 Share Posted August 11, 2005 How do I compare a region from currently captured screen to a saved region though?Thank you,LukeNope. I would also do it that way.CheersKurt<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
/dev/null Posted August 11, 2005 Author Share Posted August 11, 2005 How do I compare a region from currently captured screen to a saved region though?byte by byte??CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
LukeP Posted August 11, 2005 Share Posted August 11, 2005 Ah, I thought that perhaps there was something built in to make this easier.Lukebyte by byte??CheersKurt<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
BigDaddyO Posted August 12, 2005 Share Posted August 12, 2005 (edited) Hello Everyone,Larry made the find by rectangle thing oh, about 6 months ago. worked pretty good to. I don't remember what the link was but I used it to find x,y coords for images on a web site before we had COM support.ah HA!! found it... http://www.autoitscript.com/forum/index.ph...959entry44959Mike Edited August 12, 2005 by MikeOsdx Link to comment Share on other sites More sharing options...
Uten Posted September 14, 2005 Share Posted September 14, 2005 Just a quick thought, I think this kind of "comparing screenshots" project would benefitt from using AI and fuzzy logic to do the comparing. On example would be that you want to make you test on a machine with higher/lower screen resolution/ color depth than the one where the reference images was taken. Unfortunately I do not have any sugestions on sutable libraries and samples. Best wishes for the project. Regards Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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