Jump to content

Recommended Posts

Posted

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.

Posted

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.

:mellow:

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
Posted (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.

:mellow:

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 by thc
Posted

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

:mellow:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...