Dislocated Time Posted August 9, 2008 Share Posted August 9, 2008 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. Link to comment Share on other sites More sharing options...
bj-kaiser Posted August 9, 2008 Share Posted August 9, 2008 http://www.autoitscript.com/autoit3/docs/f...trolCommand.htmtry using "SelectString". Link to comment Share on other sites More sharing options...
Dislocated Time Posted August 9, 2008 Author Share Posted August 9, 2008 (edited) 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 - TUGZipClass: TWizardForm*snip*>>>> Control <<<<Class: TNewCheckListBoxInstance: 1ClassnameNN: TNewCheckListBox1Advanced (Class): [CLASS:TNewCheckListBox; INSTANCE:1]ID: 919194<<<<<This here keeps changing whenever I rerun the script so I can't use ControlClick on it correctlyText: Position: 40, 109Size: 417, 192ControlClick Coords: 91, 61Style: 0x54010161ExStyle: 0x00000000Handle: 0x000E069A>>>> Mouse <<<<Position: 394, 357Cursor ID: 0Color: 0xD6D3CE>>>> StatusBar <<<<>>>> Visible Text <<<<Select Additional TasksWhich 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.TUGZipB&rowse...&Don't create a Start Menu folderSetup 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\TugzipB&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 icon2. Create a quicklaunch icon3. 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 August 11, 2008 by Dislocated Time Link to comment Share on other sites More sharing options...
blinkdt Posted August 13, 2008 Share Posted August 13, 2008 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 buttonsControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Space}')Sleep(500);Use drop shadows for icon labels on the desktopControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up}{Space}')Sleep(500);Use common tasks in foldersControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 2}{Space}')Sleep(500);Show windows contents while draggingControlSend ('Performance Options','Tree1','SysTreeView321','{End}{Up 8}{Space}')Sleep(500);Show shadows under mouse pointerControlSend ('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? Link to comment Share on other sites More sharing options...
amitri Posted August 13, 2008 Share Posted August 13, 2008 (edited) 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 August 13, 2008 by amitri 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