sunburn Posted December 16, 2008 Share Posted December 16, 2008 I've got a scheduling program that I use (written in Autoit) which is now being required to enter a "control code" to complete the process. I'm at a loss as to where to go from here. Please help, I'll do the needed research, just need to know the best way to advance. What I need to do is read the 6 images from the webpage, then interpret them to their appropriate number. Later on in the script I'll insert them into the input box and submit (already have that process). Here is what that section of the html code looks like. <B CLASS=alert> Please enter the control code shown below to submit your request.</B> <BR><BR> <IMG SRC="/bots/779421.GIF"> <IMG SRC="/bots/747313.GIF"> <IMG SRC="/bots/747313.GIF"> <IMG SRC="/bots/811363.GIF"> <IMG SRC="/bots/900801.GIF"> <IMG SRC="/bots/616270.GIF"> <BR> <TABLE><TR><TD> </TD></TR><TR><TD> Enter Control Code </TD> In this case, the images are output the number 299073. The website is blocking me from rt clicking and saving any images (which I'm sure I can get around but appreciate the advice if any out there). I'm pretty sure that each digit looks the same, but are simply being rearranged. Attached is an exaple pic of what the webpage looks like Thanks for any help.untitled.bmp Link to comment Share on other sites More sharing options...
junkew Posted December 16, 2008 Share Posted December 16, 2008 http://www.autoitscript.com/forum/index.ph...=66545&st=0Above code can probably help you. Make a snapshot of that area of the screen.Make bmp's for figures 0-9 and search themBased on found position put them in the right order. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
nobbe Posted December 16, 2008 Share Posted December 16, 2008 maybe its possible to scan all the gifs and see with crc check which are equal? then reduce to the numbers 0-9 :: bots/000001.gif --> bots/999999.gif etc... Link to comment Share on other sites More sharing options...
sunburn Posted December 16, 2008 Author Share Posted December 16, 2008 (edited) junkew, Thanks for the fast reply. I'll get busy on reading up on this code it... is a little over my head as yet. You've obviously done some awesome work here. Since I can't right click on this web page, what is the best way to screen shot that area of the screen to find the bitmaps first, then later while running the script? I'm guessing the best option is the "_screencapture" seris of commands Thaks again, already a huge help. Edited December 18, 2008 by sunburn Link to comment Share on other sites More sharing options...
sunburn Posted December 16, 2008 Author Share Posted December 16, 2008 After doing more research on _screencapture, it seems the limitation is on finding the xy coordinates..... In my page, the needed coordinates are right before the submit buttons at the bottom, unfortunately, the size of the page is always changing based on the information retrieved. I'm guessing that I should find the xy cordinates of the submit button, then work backwards towards the capture area? Anybody tried that? 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