Jump to content

ControlCommand: SendCommandID as Run, not RunWait


Recommended Posts

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.
Link to comment
Share on other sites

Link to comment
Share on other sites

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 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.
Link to comment
Share on other sites

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 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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...