AutoCraig Posted June 13, 2012 Share Posted June 13, 2012 Have you tried using AutoItSetOption("WinTitleMatchMode", -2) instead of Opt("wintitlematchmode", 2)? I've had issues using Opt as opposed to AutoItSetOption, also notice the -2 instead of 2. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 13, 2012 Share Posted June 13, 2012 These 2 (AutoItSetOption & Opt) are identical, one can be substituted for the other with no change in functionality. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Hi water, thank you for spending time to help me debug. I just read your reply and ran your script. The displayed array is as follows:Row Col 0 Col1[0] 3[1] Re: Auto IT assistance installing "Intel Threading Building Blocks" -Message (HTML) 0x004D04C2[2] Re: Auto IT assistance installing "Intel Threading Building Blocks" -Message 0x00230878[3] Re: Auto IT assistance installing "Intel Threading Building Blocks" -Message (HTML) 0x002C0130By the way, I send e-mail out and recived one from one of coworkes and was told it is possbile the developer of this particular installer has blocked automated mouse and keystrokes. Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 (edited) OK, It looks like there might be more than one window with the same title. To make sure we get the correct window and send the data to the correct window we'll add some text: ;#RequireAdmin Opt("wintitlematchmode", 2) Global $iResult Global $cmd = "C:VcsourceAutoIT_installsw_installw_tbb_4.0.4.325.exe" FileChangeDir("C:VcsourceAutoIT_installsw_install") Run(@ComSpec & ' /c' & "w_tbb_4.0.4.325.exe") Sleep(2000) Global $shwndInstall = WinWait("Threading Building Blocks", "Extract the product package to folder:") If IsHWnd($shwndInstall) Then $iResult = WinActivate($shwndInstall) ConsoleWrite("WinActivate: " & $iResult & @CRLF) $iResult = ControlClick($shwndInstall, "", "[CLASS:Button;INSTANCE:4]") ConsoleWrite("ControlClick: "& $iResult & @CRLF) Send("{TAB}") Send("{TAB}") Else ConsoleWrite("2 Unable to find the Install window " & @CRLF) EndIf Edited June 14, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Hi Water, Thank you for your help. I ran it again and the log showed both "WinActivate" and "ControlClick" are successful. >Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3 +>21:37:03 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "V:Installssetup_installnew_ttb.au3" WinWait: 0WinActivate: 0ControlClick: 0 Today, one of my coworkers told me that it may be that the developer of this particular installer has blocked automated mouse and key stroke". So I tried to install another 2 microsoft products (Windows SDK and MS DirectX SDK) and got same responses that the Active Install window does not respond to any "Send" or ControlClick command. Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 I just noticed that WinActivate and ControlClick don't set @error but use the return value to denote success or error. I modified my above script. Could you please re-run it and post the result? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Water, thank you. Below is the run log: >Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3 +>21:57:27 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "V:Installssetup_installt2.au3" WinActivate: 0x000C0396 ControlClick: 1 Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 You have checked that "[CLASS:Button;INSTANCE:4]" is correct for the "Extract" button? What are the two "TAB"s for? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) I ran Au3Info.exe to get button info (see attached file). I used 2 send commands to check whether the send function works. If it works, then it should highligt different button.windowInfo.pdf Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 You could try to send Alt+E to activate the "Extract" key. ;#RequireAdmin Opt("wintitlematchmode", 2) Global $iResult Global $cmd = "C:\Vcsource\AutoIT_install\sw_install\w_tbb_4.0.4.325.exe" FileChangeDir("C:\Vcsource\AutoIT_install\sw_install\") Run(@ComSpec & ' /c' & "w_tbb_4.0.4.325.exe") Sleep(2000) Global $shwndInstall = WinWait("Threading Building Blocks", "Extract the product package to folder:") ConsoleWrite("WinWait: " & $shwndInstall & @CRLF) If IsHWnd($shwndInstall) Then $iResult = WinActivate($shwndInstall) ConsoleWrite("WinActivate: " & $iResult & @CRLF) Send("!E") Else ConsoleWrite("2 Unable to find the Install window " & @CRLF) EndIf My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) HI water, thank you very much for taking so much time to help me. I ran with your latest changes and the install window does not respond to Send("{!E}") function although window is Activated. Below is output log: >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "V:Installssetup_installtest_tbb_newest.au3" WinWait: 0x00070D8A WinActivate: 0x00070D8A Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 Last try. What I take from your screenshot is that the focus is on the input field for the directory. Let's send a tab so the focus jumps to the next Control. ;#RequireAdmin Opt("wintitlematchmode", 2) Global $iResult Global $cmd = "C:\Vcsource\AutoIT_install\sw_install\w_tbb_4.0.4.325.exe" FileChangeDir("C:\Vcsource\AutoIT_install\sw_install\") Run(@ComSpec & ' /c' & "w_tbb_4.0.4.325.exe") Sleep(2000) Global $shwndInstall = WinWait("Threading Building Blocks", "Extract the product package to folder:") ConsoleWrite("WinWait: " & $shwndInstall & @CRLF) If IsHWnd($shwndInstall) Then $iResult = WinActivate($shwndInstall) ConsoleWrite("WinActivate: " & $iResult & @CRLF) Send("{TAB}") Sleep(1000) Send("!E") Else ConsoleWrite("2 Unable to find the Install window " & @CRLF) EndIf My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Hi Water, I tried to add 1 Send ("{TAB}") as well as 2 Send ("{TAB}") and the window still does not respond. Since I downloaded this installer from my company's internal site, I will try to find out whether the developer has blocked automated mouse and key strokes for this particular installer. I will post the findings. But for the MS Windows SDK, I downloaded from public web site. I also had same problem "active install window does not respond to Send or controlClick command". I used the similar code. +>00:13:08 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "V:Installssetup_installtest_tbb_newest.au3" WinWait: 0x000C04A6 WinActivate: 0x000C04A6 Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 Then I have run out of ideas I think it's crazy for an installer to block automated keyboard input on one hand and not to provide a way for an automated install on the other. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted June 14, 2012 Share Posted June 14, 2012 Silent install for TBB seems to be an undocumented feature. Maybe you could contact someone at Intel to provide the necessary information. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Hi Water, Yes. I will find out and will post the findings too. Edited June 14, 2012 by newcome Link to comment Share on other sites More sharing options...
newcome Posted June 14, 2012 Author Share Posted June 14, 2012 I just find out that silent install for TBB option is: -s or -silentIntel® Threading Building Blocks 4.0 Update 4 for Windows* package. Usage: <Web image executable> [options] [-a <arguments>]If no command is specified, the Web Image program will proceed in the Interactive GUI mode. Options: ----------------------------------------------------------h | --help Show this help --s | --silent Silent Mode: No GUI, use default setting from command line --f | --extract-folder <extract folder>Set extraction folder where content of package will be saved --x | --extract-only Skip launching installation after extracting web image content. This option just unpacks the web image --l | --log <log file> Log all actions into this log file --r | --remove-extracted-files <yes|no> Remove temporarily extracted files after installation -a <arguments>Pass command line arguments: all arguments after “–a “ switch will be passed as command line arguments into setup.exe (option for launch executable). Includes any argument which setup.exe supports 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