theAutoitSpammer Posted November 20, 2008 Share Posted November 20, 2008 (edited) is there a function like "WinMenuSelectItem()" that selects menu items but selects tabs of CLASS:ToolbarWindow32 instead ? or is there a way to do it without a function? case in point: start-control panel-display-display properties I want to select the tab "screen saver" without using send() thanks in advance Al Edited November 25, 2008 by alram Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2008 Share Posted November 20, 2008 is there a function like "WinMenuSelectItem()" that selects menu itemsbut selects tabs of CLASS:ToolbarWindow32 instead ?or is there a way to do it without a function?case in point:start-control panel-display-display propertiesI want to select the tab "screen saver" without using send()thanks in advanceAl_GUICtrlToolbar_ClickButton() Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
TehWhale Posted November 20, 2008 Share Posted November 20, 2008 Or, GUICtrlSetState($TabItem, $GUI_FOCUS) Link to comment Share on other sites More sharing options...
theAutoitSpammer Posted November 21, 2008 Author Share Posted November 21, 2008 thank you guys but neither function works ether I'm not using them correctly or they don't work for "CLASS:ToolbarWindow32" don't forget that I didn't create the GUI , is a windows GUI. any further help will be appreciated Al Link to comment Share on other sites More sharing options...
theAutoitSpammer Posted November 25, 2008 Author Share Posted November 25, 2008 is there a function like "WinMenuSelectItem()" that selects menu items but selects tabs of CLASS:ToolbarWindow32 instead ? or is there a way to do it without a function? case in point: start-control panel-display-display properties I want to select the tab "screen saver" without using send() thanks in advance Al After numerous tries I found the answer ..here it is: ------------------------------------------------------------------ ShellExecute("control.exe", "desk.cpl") WinWaitActive("Display Properties","") Controlclick("Display Properties" , "", "[CLASS:SysTabControl32; INSTANCE:1]","left" ,1, 142, 11) ------------------------------------------------------------------ Al Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 26, 2008 Share Posted November 26, 2008 (edited) After numerous tries I found the answer ..here it is: ------------------------------------------------------------------ ShellExecute("control.exe", "desk.cpl") WinWaitActive("Display Properties","") Controlclick("Display Properties" , "", "[CLASS:SysTabControl32; INSTANCE:1]","left" ,1, 142, 11) ------------------------------------------------------------------ Al What was the toolbar discussion about if you wanted to work with a tab control? This should have worked: #include <GuiTab.au3> If Not WinExists("[CLASS:#32770; TITLE:Display Properties]") Then ShellExecute("control.exe", "desk.cpl") WinWait("[CLASS:#32770; TITLE:Display Properties]", "", 10) $hWin = WinGetHandle("[CLASS:#32770; TITLE:Display Properties]") WinActivate($hWin) $hTab = ControlGetHandle($hWin, "", "[CLASS:SysTabControl32; INSTANCE:1]") $iScreenSaverTab = _GUICtrlTab_FindTab($hTab, "Screen Saver") _GUICtrlTab_ClickTab($hTab, $iScreenSaverTab) Of course, as with many GUI configuration items like the screen saver, it is easier to configure by just editing the registry keys. In this case HKEY_CURRENT_USER\Control Panel\Desktop\ values. P.S. Requires current Beta. Edited November 26, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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