wolfbartels Posted March 19, 2007 Posted March 19, 2007 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 SmOke_N Posted March 19, 2007 Moderators Posted March 19, 2007 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.aspxhttp://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.
dabus Posted March 19, 2007 Posted March 19, 2007 (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 March 19, 2007 by dabus
wolfbartels Posted March 19, 2007 Author Posted March 19, 2007 (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 March 19, 2007 by wolfbartels
Moderators SmOke_N Posted March 19, 2007 Moderators Posted March 19, 2007 Thanks, it works. It is better to use While Not StringInStr (WinGetText($Wintitle), $Wintext)=1because $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.
wolfbartels Posted March 20, 2007 Author Posted March 20, 2007 (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 March 20, 2007 by wolfbartels
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now