Sign in to follow this  
Followers 0
SRD

Clicking subcontrols within a control

8 posts in this topic

Hi. I'm trying to use ControlClick to select a saved session in Putty.

The control ID is 1052, and this refers to the entire area where you can load, save or delete a saved session:

Posted Image

I want to click on Nagios. I've tried specifying the coordinates of the click:

ControlClick ("PuTTY Configuration", "", 1052, "left", 1, 32, 80);

but this doesn't work.

What do I need to do? Thanks.

Share this post


Link to post
Share on other sites



Edit your script so it controlclicks on 'Load', or controlsends alt-l maybe.., then inputs 'Nagios' in whatever dialog comes next.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

In Putty, I have to click on Nagios first. I can double click on it without needing to click on Load.

Share this post


Link to post
Share on other sites

Well apparently that's not working for you, I was just suggesting a 'workaround', or another way to do something.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Thanks for your help. Can you think why it would not work? Why wouldn't the coordinate click work?

Share this post


Link to post
Share on other sites

Hmm, try the ControlCommand function. Good luck.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

I'm guessing there is a invisible control covering all the controls in the "Load, save or delete a stored sessions" group. (perhaps group controls do this themselves)

The control that you want to click looks like it could be a ListBox.

Use this script to try and get all the controls within the window. That way you can look for a control that is most likely the one you want to click and send the ControlClick to that one, or use ControlCommand on it.

#Include <WinAPI.au3>
#include <array.au3>

$hWnd = WinGetHandle("PuTTY")
If Not $hWnd Then 
    ConsoleWrite("Putty Window not found" & @CRLF)
    Exit
EndIf
$aControls = _WinAPI_EnumWindows(True, $hWnd)
_ArrayDisplay($aControls)

You could also blindly try to use "[CLASSNN:ListBox1]"

Share this post


Link to post
Share on other sites

Hit 'alt-e'. How many 'tabs' must be hit before 'Nagios' is selected/highlighted? This may be another 'workaround' with controlsend..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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