Ram Posted October 27, 2007 Posted October 27, 2007 Hi I am looking for a way to get value from Visible Text. How do I go about doing that? I mean is it possible? >>>> Window <<<< Title: Figure 1 - [summary - 1] Class: Afx:400000:8:10011:0:35207fb Position: -4, -4 Size: 1288, 808 Style: 0x15CF8000 ExStyle: 0x00000110 >>>> Control <<<< Class: GXEDIT Instance: 1 ClassnameNN: GXEDIT1 ID: 52512 Text: Position: 373, 110 Size: 146, 15 ControlClick Coords: 104, 2 Style: 0x500109C5 ExStyle: 0x00000000 >>>> Visible Text <<<< Summary - 1 Abstract 20436.00 I woud like to get the value 20436.00 from the visible text. Is this possible if so wht is the command to do it? I tried getting the control info of it but just got the above. The text for the control ID is blank. It would be really great if somebody let me know this. Awaiting your response! Thanks!
Moderators SmOke_N Posted October 27, 2007 Moderators Posted October 27, 2007 WinGetText() will get the visible window text. You'll need to learn how to use the String* functions to get what you want out of it once you have 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.
Nahuel Posted October 27, 2007 Posted October 27, 2007 This should work. $Text=ControlGetText("[CLASS:Notepad]","","[CLASSNN:Edit1]") $Value=StringSplit($Text,@CRLF) For $i=1 To $Value[0] If StringRegExp($Value[$i],"[0-9][^:alpha:]") Then MsgBox(0,"",$Value[$i]) EndIf Next
Ram Posted October 29, 2007 Author Posted October 29, 2007 This should work. $Text=ControlGetText("[CLASS:Notepad]","","[CLASSNN:Edit1]") $Value=StringSplit($Text,@CRLF) For $i=1 To $Value[0] If StringRegExp($Value[$i],"[0-9][^:alpha:]") Then MsgBox(0,"",$Value[$i]) EndIf Next Wow.. This worked.. Thanks a lot Nahuel.
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