Jump to content

SysTabControl321


Recommended Posts

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

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

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

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

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

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

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

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