SRD Posted February 17, 2011 Share Posted February 17, 2011 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: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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 17, 2011 Share Posted February 17, 2011 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. Link to comment Share on other sites More sharing options...
SRD Posted February 17, 2011 Author Share Posted February 17, 2011 In Putty, I have to click on Nagios first. I can double click on it without needing to click on Load. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 17, 2011 Share Posted February 17, 2011 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. Link to comment Share on other sites More sharing options...
SRD Posted February 17, 2011 Author Share Posted February 17, 2011 Thanks for your help. Can you think why it would not work? Why wouldn't the coordinate click work? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 17, 2011 Share Posted February 17, 2011 Hmm, try the ControlCommand function. Good luck. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Tvern Posted February 17, 2011 Share Posted February 17, 2011 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]" Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 17, 2011 Share Posted February 17, 2011 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. 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