jdelaney Posted August 10, 2012 Posted August 10, 2012 I'm running across an issue exactly in line with this thread:When the ControlCommand($win,"",$toolbar,"SendcommandID",$commandid) opens a second window, the script halts until that window closes....almost like a RunWait, where I need a Run...My workaround is to call a second, compiled script to run the controlcommand, so my main script can wait for the window to open...there has got to be a better way. Any thoughts?also, GuiCtrlToolbar_ClickButton does not function with my toolbar.Thanks,JDeLaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
KaFu Posted August 10, 2012 Posted August 10, 2012 Call the ControlCommand using the AutoIt3ExecuteLine switch? Example from helpfile:Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"') OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
jdelaney Posted August 10, 2012 Author Posted August 10, 2012 (edited) Good suggestion...I'm trying that, but the command does not seem to execute: ConsoleWrite ( ' /AutoIt3ExecuteLine "ControlCommand ( ' & $hwndWindow & ','''', ' & $hwndToolbar & ', ''SendCommandID'', 36507 )"' & @crlf ) Run(@AutoItExe & ' /AutoIt3ExecuteLine "ControlCommand ( ' & $hwndWindow & ','''', ' & $hwndToolbar & ', ''SendCommandID'', 36507 )"') consolewrite output: /AutoIt3ExecuteLine "ControlCommand ( 0x0009074E,'', 0x00060776, 'SendCommandID', 36507 )" Everything looks fine, but no go. Where this does function: ControlCommand ( $hwndWindow, "", $hwndToolbar, "SendCommandID", 36507 ) Edited August 10, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
jdelaney Posted August 10, 2012 Author Posted August 10, 2012 (edited) got it: Run(@AutoItExe & ' /AutoIt3ExecuteLine "ControlCommand ( hwnd(' & $hwndWindow & '),'''', hwnd(' & $hwndToolbar & '), ''SendCommandID'', 36507 )"') This helps with a few other areas for me too; thanks again, KaFu. Edited August 10, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
KaFu Posted August 10, 2012 Posted August 10, 2012 Glad it worked out ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
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