Jump to content

Recommended Posts

Posted

Please,

Is there a way to get the TEXT (label) on the current Tab shown of a SysTabControl32?

The function ControlCommand ( "title", "text", controlID, "CurrentTab" ) returns the number and not the lable text.

  • Moderators
Posted

Please,

Is there a way to get the TEXT (label) on the current Tab shown of a SysTabControl32?

The function ControlCommand ( "title", "text", controlID, "CurrentTab" ) returns the number and not the lable text.

Surprised no one has done it... Have you checked PaulIA's AU3Lib.au3 in the Examples Script forum?

If not, these may help you get you started:

http://msdn2.microsoft.com/en-us/library/ms650940.aspx

http://msdn2.microsoft.com/en-us/library/ms650986.aspx

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

What about something like

$Wintitle='Systemeigenschaften'
$Wintext='Systemleistung' ; the text that's only in the special tab

While Not StringInStr (WinGetText($Wintitle), $Wintext)
    ControlSend($Wintitle, '', '', '+^{Tab}')
WEnd

I know that's not the solution, but a workaround if the text changes within the tab - and I could bet that it does.

Edited by dabus
Posted (edited)

What about something like

$Wintitle='Systemeigenschaften'
$Wintext='Systemleistung' ; the text that's only in the special tab

While Not StringInStr (WinGetText($Wintitle), $Wintext)
    ControlSend($Wintitle, '', '', '+^{Tab}')
WEnd

I know that's not the solution, but a workaround if the text changes within the tab - and I could bet that it does.

Thanks, it works. It is better to use

While Not StringInStr (WinGetText($Wintitle), $Wintext)=1

because $Wintext may appear somewhere else among the text. The window text always begins with the Tabs Label.

Edited by wolfbartels
  • Moderators
Posted

Thanks, it works. It is better to use

While Not StringInStr (WinGetText($Wintitle), $Wintext)=1

because $Wintext may appear somewhere else among the text. The window text always begins with the Tabs Label.

StringInStr() returns a boolean. There is no need to add "= 1" to it.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

StringInStr() returns a boolean. There is no need to add "= 1" to it.

Sorry, acording to HELP:

StringInStr

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

Checks if a string contains a given substring.

StringInStr ( "string", "substring" [, casesense [, occurrence]] )

.............

Return Value

Success: Returns the position of the substring.

Failure: Returns 0 if substring not found.

that is a number, not a boolean. I checked it.

Remember: It's not what you know .... It's what you can prove!

Edited by wolfbartels

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
  • Recently Browsing   0 members

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