Sign in to follow this  
Followers 0
jpm

Controlsend Device manager

4 posts in this topic

I cannot manage to have the following working

AutoItSetOption("WinTitleMatchMode", 4)

Run ( 'mmc.exe ' & @SystemDir & '\devmgmt.msc' )
WinWaitActive ( "Device Manager")
$hWin=WinGetHandle("Device Manager")
ControlSend($hWin,"","ToolbarWindow322","!vv"); show by connection
;ControlSend($hWin,"",4097,"!vv"); show by connection; NOT WORKING EITHER

the second v is not received.

is it a case where we cannot use ControlSend and we have to use Send?

Share this post


Link to post
Share on other sites



try...

ControlFocus($hWin,"","ToolbarWindow322")

ControlSend($hWin,"","ToolbarWindow322","!vv")

Lar.

<{POST_SNAPBACK}>

That's working. Any idea why it is needed to work that way?

Do we need to document how to controlsend to a menu/submenu?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

surprisingly enough just

ControlSend($hWin,"","ToolbarWindow322","{ALT}vv") ; show by connection

is working :idiot:

edited: even

ControlSend($hWin,"","","{ALT}vv") ; show by connection

:D

Edited by jpm

Share this post


Link to post
Share on other sites

Now the question is why a second Controlsend need to wait?

AutoItSetOption("WinTitleMatchMode", 4)

Run ( 'mmc.exe ' & @SystemDir & '\devmgmt.msc' )
WinWaitActive ( "Device Manager")
$hWin=WinGetHandle("Device Manager")
ControlSend($hWin,"","ToolbarWindow322","{ALT}vw"); show hidden device
Sleep(250) ; mandatory for next Controlsend (250 work on my system)
ControlSend($hWin,"","ToolbarWindow322","{ALT}vv"); show by connection

Share this post


Link to post
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
Sign in to follow this  
Followers 0