qazqaz Posted March 13, 2009 Share Posted March 13, 2009 Hi. I am new to autoIT and I am trying to automate test cases. I am reaching different contols with help of the send() and controlcommand() function, attaching the name of it. But I am having troble with controls within tabs. I can't get the functions to work. I can solve it with mouse coordinates, but that is not so flexible. Is there any solution for it? Regards qazqaz Link to comment Share on other sites More sharing options...
Authenticity Posted March 13, 2009 Share Posted March 13, 2009 Run('control sysdm.cpl') WinWaitActive('System Properties') Dim $hWnd = WinGetHandle('System Properties') ControlSend($hWnd, '', 'SysTabControl321', '^{TAB 3}') Is this what you mean? It'd be simpler just to run it like this: Run('control sysdm.cpl,,2') but it's true only in this case. Link to comment Share on other sites More sharing options...
qazqaz Posted March 13, 2009 Author Share Posted March 13, 2009 Hi. Partly. thanks for the answer. My problem is that I now how to press the OK button on system properties since it is below the tabs. It have a unique ID, and I am using ControlClick(title,"",ClassnameNN) But how do I press buttons within the tabs for exampel "Advanced..." on the "Remote connection" tab. ( on a application that does not have key-short cut for all buttons) Run('control sysdm.cpl') WinWaitActive('System Properties') Dim $hWnd = WinGetHandle('System Properties') ControlSend($hWnd, '', 'SysTabControl321', '^{TAB 3}') Is this what you mean? It'd be simpler just to run it like this: Run('control sysdm.cpl,,2') but it's true only in this case. Link to comment Share on other sites More sharing options...
Authenticity Posted March 13, 2009 Share Posted March 13, 2009 You mean this: (sorry for bad examples) #include <GuiTab.au3> Run('control sysdm.cpl') WinWaitActive('System Properties') Dim $hWnd = WinGetHandle('System Properties') Dim $hSysTab = ControlGetHandle($hWnd, '', 'SysTabControl321') _GUICtrlTab_ClickTab($hSysTab, 6, 'left', False) ControlClick($hWnd, '', 'Button2', 'left', 1) Link to comment Share on other sites More sharing options...
qazqaz Posted March 14, 2009 Author Share Posted March 14, 2009 Yes, thanks. You mean this: (sorry for bad examples) #include <GuiTab.au3> Run('control sysdm.cpl') WinWaitActive('System Properties') Dim $hWnd = WinGetHandle('System Properties') Dim $hSysTab = ControlGetHandle($hWnd, '', 'SysTabControl321') _GUICtrlTab_ClickTab($hSysTab, 6, 'left', False) ControlClick($hWnd, '', 'Button2', 'left', 1) 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