Sign in to follow this  
Followers 0
theAutoitSpammer

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

6 posts in this topic

#1 ·  Posted (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 by alram

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Or, GUICtrlSetState($TabItem, $GUI_FOCUS)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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:)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0