Sign in to follow this  
Followers 0
Angel

Select a Panel in a window

6 posts in this topic

I'd like to select one of the panels in the Display preferences window. There are perhaps other ways of doing it, but I'd like to know if there is some general method to select/click a panel (By its name) in the same manner as you can select a window.

I could not find anything on the help file that can do this. Is there any way to do it? If not this could be a pretty good addition to the control management functions.

Cheers,

Angel

Share this post


Link to post
Share on other sites



yes, the panels you are referring to (at least on my XP Pro system) have ControlId's and ClassnameNN is Monitor321.

you can treat them as Controls for the purposes of using AutoIt functions...


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

I'd like to select one of the panels in the Display preferences window. There are perhaps other ways of doing it, but I'd like to know if there is some general method to select/click a panel (By its name) in the same manner as you can select a window.

I could not find anything on the help file that can do this. Is there any way to do it? If not this could be a pretty good addition to the control management functions.

Cheers,

Angel

<{POST_SNAPBACK}>

You can use the AutoIt Window Info tool to get the required name etc.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

to spawn display properties at a particular tab you can do...

Run("control desk.cpl,,3")

<{POST_SNAPBACK}>

Thanks a lot Larry, I tried it and it works (although the required number is weird. I have to use 4 for the 5th panel). I knew that there was a method to directly open a tab in the Display properties window but I had forgotten it, so thanks again.

However, I also was interested in knowing if there as a general method to select a panel.

I have tried what quaizywabbit and BigDod suggested but it does not seem to work. I am using the latests AutoIt Window Info and it does not show a different ControlId and ClassName for each panel tab! They are all shown as SystabControl321. So it does not seem that it is possible to use the AutoIt Control functions to select them. Am I doing something wrong?

Cheers,

Angel

Share this post


Link to post
Share on other sites

...However, I also was interested in knowing if there as a general method to select a panel...

<{POST_SNAPBACK}>

...not that I've found.

I've used Alt-Page Up and Alt-Page Dn to move between such tabs and I've learned the hard way to move one tab, check window text and repeat.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

could try ControlCommand() + tabright or tableft. apply that to SystabControl321. ControlCommand() and Currenttab will let you know what tab you are on.

Lar.

<{POST_SNAPBACK}>

The problem with that method, as herwasplato mentionned is that you really need then to wait until each panel loads, as otherwise the key clicks might be missed by windows.

So I hope there was a proper way to dot his in AutoIt. Larry, do you think that this is possible in Windows at all?

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