rbaguley Posted July 20, 2008 Share Posted July 20, 2008 Evening all, have just discovered AutoIt and am trying to apply it to some testing we do here. I am trying to writing a script that controls a program that does not set window names properly. AutoIt v3 Window Info reports that the program has a blank window title, but has a class. I can't see an easy way to switch to this window and control it; is there a way to do this using the window class? Ideally, I need to to go to this window and click on a few buttons and select some menu items from drop-down menus, but without using mouse control; the location of the window may vary as the screen resolution may be different on different setups. Any suggestions on how to do this elegantly, so it will still work if the button is located in a different location? (incidentally, Window Info also seems to cause this program to crash; I really don't know why. Any thoughts on that?) Link to comment Share on other sites More sharing options...
monoceres Posted July 20, 2008 Share Posted July 20, 2008 Hi! This is how you use a window class. WinSetState("[CLASS:SciTEWindow]","",@SW_MINIMIZE) Clicking on buttons and such is a job for ControlSend(), check the help file for more info. muttley Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
rbaguley Posted July 21, 2008 Author Share Posted July 21, 2008 Thanks! Should that CLASS: approach work with functions such as WinActivate? I am trying the following, but it is not working: CODEWinActivate (" [ CLASS:DMWChild]") Send ("{F1}") Should that work, or do I need to write the Window title? However, it is not activating the relevant window, and the F1 is going elsewehre. Link to comment Share on other sites More sharing options...
JFee Posted July 21, 2008 Share Posted July 21, 2008 I think that should work... search Window Titles and Text in the helpfile for reference. WinActivate("[CLASS:DMWChild]") Send ("{F1}") The space before the [ is causing the issue Regards,Josh Link to comment Share on other sites More sharing options...
rbaguley Posted July 21, 2008 Author Share Posted July 21, 2008 The space before the [ is causing the issue Ahah! Well spotted. Thanks! Link to comment Share on other sites More sharing options...
FreeFry Posted July 21, 2008 Share Posted July 21, 2008 Also have a look here: http://www.autoitscript.com/autoit3/docs/i...owsadvanced.htm ( or alternatively in the respective section in the helpfile ) muttley 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