Moon Posted August 15, 2006 Share Posted August 15, 2006 I have a window that lets me search a database, in the lower left corner it says: 23.245 entries 50 marked I wanna get the 23.245 as text. How do I do it if Auinfo does not give any text when I hover over this entry? TIA! Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 15, 2006 Moderators Share Posted August 15, 2006 I have a window that lets me search a database, in the lower left corner it says:23.245 entries 50 markedI wanna get the 23.245 as text. How do I do it if Auinfo does not give any text when I hover over this entry?TIA!Try this script and see if it finds the control with that text. Link to comment Share on other sites More sharing options...
Moon Posted August 16, 2006 Author Share Posted August 16, 2006 (edited) It looks good but it does not seem to work properly, maybe cause I', on AutoIt 3.2? I can grab info from the window but the listed items do not contain the "number of entries" I'm looking for. So I tried to copy all to the clipboard to see whether I can get the info from this. Doing so I get the error message: Error in line 327 Subscript used with non-Array variable. This happens whether I try to copy all or just some items. EDIT: I was blind again, the info is there, it reads: '&Direct Hits (854)' whereas '854' is the number I'm interested in. Now when I press the (+) on it I get: TcxTabSheet2 So this is the control handle I gotta read from to get the value '854'? Like $var = ControlGetText("My Window", "", "TcxTabSheet2") Sorry, I'm still a bit confused about all of this... Edited August 16, 2006 by Moon Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 16, 2006 Moderators Share Posted August 16, 2006 Now when I press the (+) on it I get: TcxTabSheet2So this is the control handle I gotta read from to get the value '854'? Like$var = ControlGetText("My Window", "", "TcxTabSheet2")Yes that looks right. Link to comment Share on other sites More sharing options...
Moon Posted August 16, 2006 Author Share Posted August 16, 2006 Oops, I should have been more specific. I DID use $var = ControlGetText("My Window", "", "TcxTabSheet2") but all it returned was "" and not '854'. So what did I do wrong? Link to comment Share on other sites More sharing options...
Moon Posted August 17, 2006 Author Share Posted August 17, 2006 OK, so I've fiddled around with it a bit and used a different window which also displays info from the database but in a more specific way. Using Au3info I've identified the Control ID I'm interested in: Control ID: 66098 ClassNameNN: TdxStatusBar1 Text: As you can see the Text field is empty even though the control has the text '854 Entries'. Thus when I use $num_entries = ControlGetText("My Window", "", 66098) it returns an empty string. Curiously enough this text IS retrievable with the function WinGetText and shown in Au3Info under >>>> Visible Window Text <<<< like this: Toolbar &command1 &command2 &command3 on (U) on (U) &filter1 category &direct hits (854) more hits sorted by sorted by So how can I convert this string returned by WinGetText to '854' (the number may be smaller/larger but it'll always be in brackets), which is all I'm interested in? Link to comment Share on other sites More sharing options...
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