miriamcaboe

How can I select(click) option from dropdown menu?

6 posts in this topic

#1 ·  Posted

Hello everyone,

Can you please guide me through the steps needed in order to be able to select an option from a dropdown menu? Something like selecting a language when installing a program. I know how to click a button - I followed this example: 

Thank you!

Share this post


Link to post
Share on other sites



#2 ·  Posted

It kind of depends on the program you want to install, majority of software has silent installers which can be configured without the need for clicking buttons etc...  Can you name the software you're trying to install?

Share this post


Link to post
Share on other sites

#3 ·  Posted

Ok, let's take the Malwarebytes installation example on the tutorial I was following. At some point, it needs to select the language, he doesn't do that in this video but let's say he would have to change to a different language than English. How should that be done?

Share this post


Link to post
Share on other sites

#4 ·  Posted

Send or ControlSend should be a last resort for installing software, for example to install MalwareBytes

Download: mb3-setup-consumer-3.0.6.1469-1075.exe
On a test system run the command:

  1. mb3-setup-consumer-3.0.6.1469-1075.exe /SAVEINF="MalwareBytes.inf"
    nb: MalwareBytes.inf is just an example it can be anything.
  2. Go thorough all the steps and configure the installation as required, example language, desktop icon, installation folder etc...
  3. Once finished you should now have a MalwareBytes.inf file in the same folder as the setup with all the options you used during the setup.
  4. To deploy: mb3-setup-consumer-3.0.6.1469-1075.exe /LOADINF="MalwareBytes.inf" /Silent /Norestart

That's it you can now deploy to other machines on your home network, unless you have a corporate license and you can deploy on your network.

If you just want to see how you select a language using control commands you would need something like this:

#RequireAdmin
$hWnd = WinWaitActive("Select Setup Language", "")
ControlCommand($hWnd, "", "TNewComboBox1", "SelectString", "suomi")

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

Thank you for your time but NO, I don't want to install Malwarebytes, I don't need a workaround for installing malwarebytes - I want to know how can I click/select a dropdown menu (just like the one that's selecting the language in the Malwarebytes installation) with help from autoit.

Share this post


Link to post
Share on other sites

#6 ·  Posted

Hmm. It's exactly what the 3-liner code that Subz wrote does. The needed infos about the window/control can be found using the AutoIt info tool "Au3Info.exe"

OTOH you can check the needed keys to do what you want and then use ControlSend several times

 

Share this post


Link to post
Share on other sites

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