Jump to content
Sign in to follow this  
OchoNueve

SysTabControl321

Recommended Posts

OchoNueve

I am trying to get to the "Desktop" tab in "Display Properties" window (right click on desktop and go to properties).

Is there a way to get the text from a SysTabControl321? I have tried _GUICtrlTab_GetItemText() but it didn't work.

Any help? Thanks.


[font="Times New Roman"]Ocho.[/font]

Share this post


Link to post
Share on other sites
spudw2k

This works for me. Retrieves text of current selected tab.

#Include <GuiTab.au3>

$ctrl = ControlGetHandle("Display Properties","","SysTabControl321")
$rslt = _GUICtrlTab_GetItemText($ctrl,_GUICtrlTab_GetCurSel($ctrl))
msgbox(0,"",$rslt)
Edited by spudw2k

Share this post


Link to post
Share on other sites
OchoNueve

CODE
#Include <GuiTab.au3>

$ctrl = ControlGetHandle("Display Properties","","SysTabControl321")

$rslt = _GUICtrlTab_GetItemText($ctrl,_GUICtrlTab_GetCurSel($ctrl))

msgbox(0,"",$rslt)

This did not work for me...I get an empty msgbox...


[font="Times New Roman"]Ocho.[/font]

Share this post


Link to post
Share on other sites
spudw2k

hmmm. that's odd.....and you had Display Properties open at the time? Is it in English or perhaps spelled different?

do you have admin rights? (not sure if it's required...just a troubleshooting thought)

Edited by spudw2k

Share this post


Link to post
Share on other sites
OchoNueve

hmmm. that's odd.....and you had Display Properties open at the time? Is it in English or perhaps spelled different?

do you have admin rights? (not sure if it's required...just a troubleshooting thought)

I do not have the window open already, but this is what I do:

CODE

#include <GuiTab.au3>

Run("control.exe desk.cpl")

Sleep(500)

$ctrl = ControlGetHandle("Display Properties","","SysTabControl321")

$rslt = _GUICtrlTab_GetItemText($ctrl,_GUICtrlTab_GetCurSel($ctrl))

msgbox(0,"",$rslt)

And I still get an empty msgbox(). Oh and I do have Admin rights.


[font="Times New Roman"]Ocho.[/font]

Share this post


Link to post
Share on other sites
OchoNueve

Why are you doing it the hard way? Try this:

Run("control.exe desk.cpl ,0")

See HERE for the codes

The reason I'm doing it the hard way is because...well actually it's because I didn't know the easy way :D lol. Thanks a lot AdmiralAlkex! Works perfectly!


[font="Times New Roman"]Ocho.[/font]

Share this post


Link to post
Share on other sites
AdmiralAlkex

The reason I'm doing it the hard way is because...well actually it's because I didn't know the easy way :D lol. Thanks a lot AdmiralAlkex! Works perfectly!

Well I just had a vague memory something like that existed, I couldn't have done it without Google :D

Share this post


Link to post
Share on other sites
OchoNueve

Well I just had a vague memory something like that existed, I couldn't have done it without Google :D

Bing is taking over :D


[font="Times New Roman"]Ocho.[/font]

Share this post


Link to post
Share on other sites
OchoNueve

Not on my computer :D

Jajaja. Hey quick question, what happens if somehow the "Desktop" tab is dissabled and I run my program? I would try and test it but I don't know how to dissable that tab...


[font="Times New Roman"]Ocho.[/font]

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  

×