sfresher Posted October 1, 2008 Posted October 1, 2008 I used _GUICtrlTab_SetCurSel to select the tab, and also used _GUICtrlTab_SetCurFocus to set focus to the tab, but the tab interface is still not update, why? What I mean is, for example, there are two tabs - Windows and Mac. Under Windows tab, it shows Windows XP, Vista; under the Mac tab, it shows OS X, Leopard. However, when I use autoit to select the Mac tab, it still shows Windows XP, Vista.
martin Posted October 1, 2008 Posted October 1, 2008 sfresher said: I used _GUICtrlTab_SetCurSel to select the tab, and also used _GUICtrlTab_SetCurFocus to set focus to the tab, but the tab interface is still not update, why?What I mean is, for example, there are two tabs - Windows and Mac. Under Windows tab, it shows Windows XP, Vista; under the Mac tab, it shows OS X, Leopard. However, when I use autoit to select the Mac tab, it still shows Windows XP, Vista.The Beta version has a function _GUICtrlTab_ClickTab which will do what you want. If you don't want to use the Beta then you could copy and paste that function to your script. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
rasim Posted October 1, 2008 Posted October 1, 2008 sfreshermartinI don't know how implemented tab selection in the beta version, but this fork for me:#include <WindowsConstants.au3> #include <GuiTab.au3> Send("#{Pause}") Dim $sTitle = "Свойства системы" ;Change title name, because my OS is russian :) WinWait($sTitle) WinActivate($sTitle) WinWaitActive($sTitle) $hWnd = WinGetHandle($sTitle) $hTab = ControlGetHandle($hWnd, "", "SysTabControl321") $TabID = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hTab) $TabID = $TabID[0] MsgBox(48, "Attention", "Now we change a tab item") _GUICtrlTab_SetCurFocus($hTab, 1) $sResult = _SendMessage($hWnd, $WM_NOTIFY, $TabID, $TCN_SELCHANGE)
sfresher Posted October 1, 2008 Author Posted October 1, 2008 Thanks a lot! It works for me. But I really don't get it, what does the following code do? rasim said: sfresher martin I don't know how implemented tab selection in the beta version, but this fork for me: $TabID = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hTab) $TabID = $TabID[0]
sfresher Posted October 1, 2008 Author Posted October 1, 2008 Hmm... a new problem pops up. After I set the focus to the tab, I cannot use controlclick to click on a button that sits outside the tab, but within the same window.How to overcome this issue? sfresher said: Thanks a lot! It works for me. But I really don't get it, what does the following code do?
rasim Posted October 2, 2008 Posted October 2, 2008 Quote sfresherBut I really don't get it, what does the following code do? Quote MSDNThe GetDlgCtrlID function retrieves the identifier of the specified control.In other words this function convert the control handle to a control ID. Quote sfresherHmm... a new problem pops up. After I set the focus to the tab, I cannot use controlclick to click on a button that sits outside the tab, but within the same window.How to overcome this issue?Show your code.
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