BigRedEO Posted October 10, 2013 Posted October 10, 2013 I just started learning to use AutoIt last week. I am using it within a Powershell script to automatically install various printer drivers using the printer manufacturers' executable files or install wizards. The one I'm currently working on has me stuck just trying to check a checkbox. Once you check that checkbox, the "Next" button becomes active so I can continue I've tried what has worked with other install files/wizards - ControlClick (for what looked like a checkbox, but turned out to actually be a button): ControlClick ("Zebra Setup Utilities - InstallAware Wizard", "I have read the information above", 132112) I tried ControlCommand ControlCommand ("Zebra Setup Utilities - InstallAware Wizard", "I have read the information above", 132112, "Check") I even noticed that the "h" in "I have read the information above" was underlined, so if I hit the "h" key it will check and uncheck the box. So I tried Send - Send ("h") No response. I'm not sure how to get past this one. Here is the Summary information for it that I got using Window Info ->>>> Window <<<< Title: Zebra Setup Utilities - InstallAware Wizard Class: TPoolTemplate Position: 419, 380 Size: 503, 388 Style: 0x16CA0000 ExStyle: 0x00050100 Handle: 0x00000000000303D8 >>>> Control <<<< Class: TRzCheckBox Instance: 1 ClassnameNN: TRzCheckBox1 Name: Advanced (Class): [CLASS:TRzCheckBox; INSTANCE:1] ID: 132112 Text: I &have read the information above Position: 8, 280 Size: 184, 15 ControlClick Coords: 7, 10 Style: 0x54010000 ExStyle: 0x00000000 Handle: 0x0000000000020410 >>>> Mouse <<<< Position: 437, 695 Cursor ID: 0 Color: 0xF4F4F4 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< < &Back &Next > Cancel I &have read the information above This application requires using ZDesigner Windows drivers version 1.5.09 or later. Using earlier versions will cause the message "The selected printer is not supported" to be displayed in the main screen. A compatible driver included in this installation can be installed by clicking the "Install New Printer" button on the main screen. >>>> Hidden Text <<<< Any ideas?
Solution GordonFreeman Posted October 10, 2013 Solution Posted October 10, 2013 (edited) Try this ControlCommand("Zebra Setup Utilities - InstallAware Wizard", "", "[CLASS:TRzCheckBox; INSTANCE:1]", "Check") Or ControlCommand("Zebra Setup Utilities - InstallAware Wizard", "", "[TEXT:I &have read the information above]", "Check") Or ControlSend("Zebra Setup Utilities - InstallAware Wizard","", "", "!{h}") Edited October 10, 2013 by GordonFreeman Frabjous Installation
BigRedEO Posted October 10, 2013 Author Posted October 10, 2013 Try this ControlCommand("Zebra Setup Utilities - InstallAware Wizard", "", "[CLASS:TRzCheckBox; INSTANCE:1]", "Check") Or ControlCommand("Zebra Setup Utilities - InstallAware Wizard", "", "[TEXT:I &have read the information above]", "Check") Thank you - tried both, but unfortunately, neither one worked.
BigRedEO Posted October 10, 2013 Author Posted October 10, 2013 Wait - no! Finally noticed I did not have the ampersand in the WinWaitActive command just above that for "I &have read the information above" and that worked when combined with the TEXT: option! Thank you!
GordonFreeman Posted October 10, 2013 Posted October 10, 2013 Good! Always copy from Autoit Window Info (With Doble click you can do it) instead of writting value. I think TEXT is the best option in this case why never change Frabjous Installation
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