Jump to content

selecting tabs in a window without send() [SOLVED]


Recommended Posts

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 by alram
Link to comment
Share on other sites

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

_GUICtrlToolbar_ClickButton()

:mellow:

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

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 o:)

Link to comment
Share on other sites

After numerous tries :) I found the answer o:) ..here it is:

------------------------------------------------------------------

ShellExecute("control.exe", "desk.cpl")

WinWaitActive("Display Properties","")

Controlclick("Display Properties" , "", "[CLASS:SysTabControl32; INSTANCE:1]","left" ,1, 142, 11)

------------------------------------------------------------------

Al :mad:

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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...