jbc1 Posted March 26, 2008 Share Posted March 26, 2008 Hi, I am trying to create an application in AutoIT to run some testing on the applications my company develops. All the application needs to do is cycle through each dialog and take a screenshot as it goes. The screenshots are then sent to our translation vendors who check them for translation inconsistencies, mis-spellings etc. I don't want to use co-ordinates (e.g. click 234, 89) to navigate as the script will hopefully run across all our languages (20+), and some components may be placed differently. If I have the ID of a window (e.g. 359E5D5339CD4F2ABE08843BB9E91D22) and the id's of components, (such as buttons, links etc.) within the window, is there any way I can use this and an interface to automate? I am new to this, so any suggestions/code examples you may have may help me greatly. Thanks, jbc1 Link to comment Share on other sites More sharing options...
Swift Posted March 26, 2008 Share Posted March 26, 2008 (edited) My suggestion is to use _ScreenCapture* Functions, to allow a screen capture, and do a simple Send("{ENTER}") key to pass each msgbox, this shouldnt be actually very hard. I don't know if by dialog, you mean msgbox, or a window/GUI. Maybe something like this: #Include <ScreenCapture.au3> While 1 $i=$i+1 WinWaitActive("") _ScreenCapture_Capture(@DesktopDir & "\pic"& $i) Send("{ENTER}") WEnd EDIT: if your not using msgbox's, use WinClose("") instead of Send("{ENTER}") EDIT: This may not be the best way, but so far its closing msgbox's! Edited March 26, 2008 by R6V2 Link to comment Share on other sites More sharing options...
ofLight Posted March 26, 2008 Share Posted March 26, 2008 As long as the App uses the correct microsoft GUI standard (eg: not Java) you can use ControlSend and ControlClick functions to send the commands directly to the Correct Window and correct control on the window, that way you cant miss. There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
jbc1 Posted March 26, 2008 Author Share Posted March 26, 2008 The only probelm is the GUI is very complex, so I need unique Id's to identify each component/button/link. The UI actually integrates a number of point products. Link to comment Share on other sites More sharing options...
Swift Posted March 26, 2008 Share Posted March 26, 2008 So, im not really understanding this, you have alot of GUI, that need a screenshot taken of, then closed, or click on a button? Link to comment Share on other sites More sharing options...
jbc1 Posted March 26, 2008 Author Share Posted March 26, 2008 OK, I'll try and explain further. The GUI I am trying to automate is the GUI for an 'master shell', which brings together an number of different products. The basic algorithm for this my AutoIT app should be: - Open shell - navigate to advanced menu - open product x, take screenshot, close. - ... continue until all products have been screenshooted. - end I think the GUI uses the DOM. Link to comment Share on other sites More sharing options...
Swift Posted March 26, 2008 Share Posted March 26, 2008 My code will not work for this then, im actually not sure how to automate this process, it actually seems very complicated because you have to count the products, open the shell, and know how many products are there. Could you show us a screen shot of what this shell looks like that holds the menu with all your programs? Link to comment Share on other sites More sharing options...
jbc1 Posted March 26, 2008 Author Share Posted March 26, 2008 My code will not work for this then, im actually not sure how to automate this process, it actually seems very complicated because you have to count the products, open the shell, and know how many products are there. Could you show us a screen shot of what this shell looks like that holds the menu with all your programs?Thanks for your time R6V2.I can't upload a screenshot here, as this product is currently not yet released to the wider public.Thanks,jbc1 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