Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

How to Select Deselect Options in Combo List?

Recommended Posts


I've been recording my installations with AutoIt and have come across one problem.

During recording, I'll click a combo box to select it.

When I test my scripts, the combo boxes are already selected, because windows somehow remembers what was selected and then DEselects them.

Is there any way to use some send command to make absolutely sure that certain boxes are selected or deselected?

I have been able to find anything understandable or usable in the help file.

Link to post
Share on other sites

Do you have an example where that works?

That's one of the things that I don't so much like about AutoIt... there are simply not enough examples... I have spent hours trying out possibilities out before anything really works.

Let me reiterate a little bit so that some of you might understand my dilemma.

Here's an example:

AutoIt v3 Window Info "Summary":

>>>> Window <<<<

Title: Setup - TUGZip

Class: TWizardForm


>>>> Control <<<<

Class: TNewCheckListBox

Instance: 1

ClassnameNN: TNewCheckListBox1

Advanced (Class): [CLASS:TNewCheckListBox; INSTANCE:1]

ID: 919194<<<<<This here keeps changing whenever I rerun the script so I can't use ControlClick on it correctly


Position: 40, 109

Size: 417, 192

ControlClick Coords: 91, 61

Style: 0x54010161

ExStyle: 0x00000000

Handle: 0x000E069A

>>>> Mouse <<<<

Position: 394, 357

Cursor ID: 0

Color: 0xD6D3CE

>>>> StatusBar <<<<

>>>> Visible Text <<<<

Select Additional Tasks

Which additional tasks should be performed?

Select the additional tasks you would like Setup to perform while installing TUGZip, then click Next.

< &Back

&Next >


>>>> Hidden Text <<<<

Setup will create the program's shortcuts in the following Start Menu folder.

To continue, click Next. If you would like to select a different folder, click Browse.



&Don't create a Start Menu folder

Setup will install TUGZip into the following folder.

To continue, click Next. If you would like to select a different folder, click Browse.

D:\Program Files\Tugzip


At least 15.8 MB of free disk space is required.

Please read the following License Agreement. You must accept the terms of this agreement before continuing with the installation.

The dilemma is, that there are 3 options in this menu which are not listed in this summary:

1. Create a desktop icon

2. Create a quicklaunch icon

3. Don't display the configuration wizard when Tugzip is launched for the first time.

For the first two options, I can use the Send("{!q}") or Send("{!d}") commands, but the third has no ALT command with which I can work.

When I use the mouse to checkmark any of the boxes and then do an install in my virtual workstation, it keeps that information and remembers it for this PC, but when I install it on another PC, the checkmarks in that checklist are missing or inverted.

Edited by Dislocated Time
Link to post
Share on other sites

Here's how I adjust visual settings using AutoIt:

TrayTip('Unattended Installation', 'Adjusting visual settings . . . please wait . . .', 0, 1)
WinWaitActive("System Properties")
Send("{TAB 3}")
Send("{RIGHT 3}")
WinWaitActive("Performance Options")
ControlClick("Performance Options", "", "Button3")
;Use visual styles on windows and buttons
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Space}')
;Use drop shadows for icon labels on the desktop
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up}{Space}')
;Use common tasks in folders
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 2}{Space}')
;Show windows contents while dragging
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 8}{Space}')
;Show shadows under mouse pointer
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 10}{Space}')
WinWaitActive("System Properties")
TrayTip("clear tip","",0)

Notice that I'm not trying to click the boxes but rather--keep it simple--use ControlSend to navigate within the Combo Box and place the check mark using the spacebar. Always impressive to watch it run, too.

Where the heck is MHz when ya need 'im? :sneaky:

Link to post
Share on other sites

Sorry blinkdt I'm new to Autoit, very impressive script. So if it's not too much bother - could you also change the script for the "Adjust for best performance" option.

During unattended XP somehow I always fail to do it in nLite or through regfile. Thanks in advance.

Edit: nevermind, found it, button3 only works OK

Edited by amitri
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...