• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Dislocated Time

How to Select Deselect Options in Combo List?

5 posts in this topic

Hi.

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.

0

Share this post


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

*snip*

>>>> 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

Text:

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 >

Cancel

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

TUGZip

B&rowse...

&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

B&rowse...

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
0

Share this post


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)
Send("#r")
WinWaitActive("Run")
Send("sysdm.cpl{Enter}")
WinWaitActive("System Properties")
Send("{TAB 3}")
Send("{RIGHT 3}")
Send("!s")
WinWaitActive("Performance Options")
Sleep(1000)
ControlClick("Performance Options", "", "Button3")
Sleep(500)
;Use visual styles on windows and buttons
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Space}')
Sleep(500)
;Use drop shadows for icon labels on the desktop
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up}{Space}')
Sleep(500)
;Use common tasks in folders
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 2}{Space}')
Sleep(500)
;Show windows contents while dragging
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 8}{Space}')
Sleep(500)
;Show shadows under mouse pointer
ControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 10}{Space}')
Sleep(500)
Send("{ENTER}")
WinWaitActive("System Properties")
Send("{ENTER}")
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:

0

Share this post


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
0

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

  • Recently Browsing   0 members

    No registered users viewing this page.