tradertt Posted May 25, 2006 Share Posted May 25, 2006 #NoTrayIcon Sleep(15000) while 1 AutoItSetOption("WinTitleMatchMode", 4) WinWait( "classname=#32770", "", 5 ) ControlFocus ( "classname=#32770","" , "Button2" ) ControlClick ( "classname=#32770", "" , "Button2","left" ) wend Hi I have 2 problems: 1) It clicks on all windows with 2 buttons Is there a way to be more focus on the actual window that I want. It is a SAVE AS window of a program. Which part of it is Unique to that program? 2) Can I make it ACTIVATE the window into the foreground first as I find that the program sometimes hangs and does not click when the window is in the background. Not too sure why Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Ebenezer Posted May 25, 2006 Share Posted May 25, 2006 Just a few questions: when you use Window Info on your program window, the classname is "32770" ? Could you post a screenshot of the window and the info out of the window-info tool? The AutoItSetOption("WinTitleMatchMode", 4) should not be in the While - whend loop since it only needs to be set once. There is an WinActivate ( "title" [, "text"] ) command. Have a look at the helpfile for that. Thanks, E. Link to comment Share on other sites More sharing options...
tradertt Posted May 25, 2006 Author Share Posted May 25, 2006 Sorry just one problem. The computer which the program is in is not at home. It is in my Hostel so I do not have it now. I will look through the window info but I guess even the ClassID is not unique right? Can I use ClassID or something else instead of Classname 32770? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
GEOSoft Posted May 25, 2006 Share Posted May 25, 2006 #NoTrayIcon Sleep(15000) while 1 AutoItSetOption("WinTitleMatchMode", 4) WinWait( "classname=#32770", "", 5 ) ControlFocus ( "classname=#32770","" , "Button2" ) ControlClick ( "classname=#32770", "" , "Button2","left" ) wend Hi I have 2 problems: 1) It clicks on all windows with 2 buttons Is there a way to be more focus on the actual window that I want. It is a SAVE AS window of a program. Which part of it is Unique to that program? 2) Can I make it ACTIVATE the window into the foreground first as I find that the program sometimes hangs and does not click when the window is in the background. Not too sure whySee; WinSetOnTop ( "title", "text", flag ) WinActivate ( "title" [, "text"] ) and even If WinActive ( "title" [, "text"] ) Then................. Also I would consider changing AutoItSetOption("WinTitleMatchMode", 4) to AutoItSetOption("WinTitleMatchMode", 2) or AutoItSetOption("WinTitleMatchMode", 4) or maybe even AutoItSetOption("WinTitleMatchMode", 3) if it becomes critical, and then make sure that the title matches George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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