devi Posted August 3, 2011 Share Posted August 3, 2011 I want to check the tab name(Results) is visible or not .so, i use this command $exist = ControlCommand("Title", "", "[CLASS:Class Name;INSTANCE:29]", "IsVisible","Results") then i got tab name is visible.now i want to click the tab name(Results).can u suggest which command is better. Link to comment Share on other sites More sharing options...
wakillon Posted August 3, 2011 Share Posted August 3, 2011 ControlClick ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
devi Posted August 3, 2011 Author Share Posted August 3, 2011 Thx, Control command is not working.bcoz,if the tab name(Results) is visible means it returns 1.That is working, but how to hold the tab name and click the tab name. Link to comment Share on other sites More sharing options...
MrMitchell Posted August 3, 2011 Share Posted August 3, 2011 (edited) I want to check the tab name(Results) is visible or not .so, i use this command $exist = ControlCommand("Title", "", "[CLASS:Class Name;INSTANCE:29]", "IsVisible","Results") then i got tab name is visible.now i want to click the tab name(Results).can u suggest which command is better. You sure you are using the ControlCommand() properly? Help File says nothing is required in the last parameter (where you have "Results"), so it's likely that 1 that is returned is referring to the window, not the tab. I've never done this because I never had a need for it, but try ControlCommand with the "CurrentTab" command, to check if you're on the right tab. If not, use ControlCommand again this time with the TabLeft or TabRight command then check again to see fi you're on the right tab. Then, you don't need to click the tab because it looks like these functions navigate the tabs for you when called. Edit/add: So looks like there's a GuiTab.au3 UDF with a function called _GUICtrlTab_ClickTab(). Try that! It might only work with GUIs created with AutoIt, though. Edited August 3, 2011 by MrMitchell Link to comment Share on other sites More sharing options...
kshitiswar Posted May 27, 2013 Share Posted May 27, 2013 Hi All, I am using VB6 standard SSTab control(SSTabCtlWndClass). In my case non of UDF controls return expected value. I tried with controlcommand, even it's not working in my case. Following are not working: Method1: local $hWnd = WaitControlGetHandle( "SSTabCtlWndClass1") If $hWnd = "" Then Return -1; Endif ; Loop through all tabs to find the matching text, I think this only includes visible tabs For $TabIdx = 0 To _GUICtrlTab_GetItemCount($hWnd) local $sTabCaption = _GUICtrlTab_GetItemText($hWnd, $TabIdx) If $sTabCaption = "Indicators"Then (Indicators is my tab name) Return $TabIdx Endif Next _GUICtrlTab_GetItemCount returns 0 while they are 2 tabs exists. _GUICtrlTab_GetItemText is always returns blank. Method2: local $Ret = ControlCommand($m_CurrentObject,"","SSTabCtlWndClass1", "CurrentTab","") local $Ret1 = ControlCommand($m_CurrentObject,"","SSTabCtlWndClass1", "TabRight", "") return is 0 in both cases. Kindly help. Thank you, KT 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