thc Posted November 5, 2008 Share Posted November 5, 2008 So I'm trying to automate this program. When I click on a button, it opens up a child window in the same relative position every time. The window has no title and apparently no controls. It does however have the same class name every time. The window looks like a drop down menu... but is not (Window Info shows no controls). Basically, I want to select the second item in the list. Is there an easy, clean way to do this? I want to avoid having to use the Send function... Thank you. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 5, 2008 Share Posted November 5, 2008 So I'm trying to automate this program. When I click on a button, it opens up a child window in the same relative position every time. The window has no title and apparently no controls. It does however have the same class name every time. The window looks like a drop down menu... but is not (Window Info shows no controls). Basically, I want to select the second item in the list. Is there an easy, clean way to do this? I want to avoid having to use the Send function...Thank you.Use ControlSend() so you can more accurately target the window. You can leave the controlID null "" and send the actions to the window. Experiment with it from the keyboard to know what works, i.e. "{UP}", "{DOWN}", "{LEFT}", "{RIGHT}", "+{TAB}", etc. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
thc Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) Use ControlSend() so you can more accurately target the window. You can leave the controlID null "" and send the actions to the window. Experiment with it from the keyboard to know what works, i.e. "{UP}", "{DOWN}", "{LEFT}", "{RIGHT}", "+{TAB}", etc. Thanks, I didn't know you could have a null control argument. But how do I target a window with no title or text?edit: n/m figured it out. "A special description can be used as the controlID parameter used in most of the Control...() functions." Edited November 5, 2008 by thc Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 5, 2008 Share Posted November 5, 2008 Thanks, I didn't know you could have a null control argument. But how do I target a window with no title or text? edit: n/m figured it out. "A special description can be used as the controlID parameter used in most of the Control...() functions." You said you had the class, so I meant something like: Opt("WinTitleMatchMode", 4) ; ... ControlSend("[CLASS:WindowClassHere]", "", "", "{Down}"); Down one in the list Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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