VijayKumarLikhi Posted August 25, 2011 Posted August 25, 2011 Hi All,Not able to get content from TextBox control of Class:BEDIT type. The application is developed in VC++.I have tried 'ControlGetText()' function, it is returning the name/Text of control.Below is the information about TextBox control using "AutoIt Window Info" tool. Please share solution for the same. I am in need of urgent help... please respond as soon as possibleThanks a lot in advance. >>>> Window <<<<Title: DPM8016_1 - MatrixClass: #32770Position: 198, 107Size: 592, 504Style: 0x94C800C4ExStyle: 0x00010181Handle: 0x004906BE>>>> Control <<<<Class: BEDITInstance: 2ClassnameNN: BEDIT2Name: Advanced (Class): [CLASS:BEDIT; INSTANCE:2]ID: 106Text: DPM8016_1 - Matrix - OutChannelRampTime 1Position: 69, 454Size: 31, 15ControlClick Coords: 16, 6Style: 0x50000080ExStyle: 0x00000010Handle: 0x004B081A>>>> Mouse <<<<Position: 286, 588Cursor ID: 0Color: 0xFFFFFF
somdcomputerguy Posted August 25, 2011 Posted August 25, 2011 Help somebody help you. Show the code you've tried. So somebody doesn't say 'try this', and you reply 'I've already tried that'.. Posting what you've done already saves everybody alot of time.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
VijayKumarLikhi Posted August 26, 2011 Author Posted August 26, 2011 Thanks for reply.. 'ControlGetText()' works fine with TextBox of CLASS:EDIT. But it seems that it does not work with TextBox of CLASS:BEDIT if you have any alternative solution for getting the content from BEDIT type text box control, please let me know. Thanks
JohnOne Posted August 26, 2011 Posted August 26, 2011 I agree, post your efforts, so people can see exactly what you tried.You can mess about all day long just writing "ControlGetText()' works fine with TextBox of CLASS:EDIT" and the like.But it is not code.Its only your "urgent" time you are wasting if you cannot be bothered. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
VijayKumarLikhi Posted August 26, 2011 Author Posted August 26, 2011 Here is Code $txt = ControlGetText("[Title:DPM8016_1 - Matrix]","","[CLASS:BEDIT;INSTANCE:2]")
somdcomputerguy Posted August 26, 2011 Posted August 26, 2011 (edited) Does this work for you? $txt = ControlGetText("Title:DPM8016_1 - Matrix", "", "BEDIT2") Edited August 26, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
VijayKumarLikhi Posted August 26, 2011 Author Posted August 26, 2011 No, it is giving the Text of control not the content of TextBox.
somdcomputerguy Posted August 26, 2011 Posted August 26, 2011 Can you post a screenshot of this program you're trying to get stuff from? Edit, if you can, the pic to draw lines around where you want to get stuff from and where you're getting from instead (the textbox and the control (which should be the same I think..)). Look again thru the Info tool output, is what you want listed in the 'visible text' section? Maybe the WinGetText function can be used.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Frescard Posted January 22, 2012 Posted January 22, 2012 (edited) Since I seems to be having the same issue, I'm just continuing here, rather than starting a new one.I have the same issue with being unable to read a textbox (which seems to be of type FastFileEdit).I can read the button on the window, but not the textbox.Part of the issue might be that the title of the window is empty (but that's just a guess).The only method that finally worked for me (and might help others in a similar situation) was to copy the text into the clipboard, and to then read it from there. But that seems a bit clumsy, and I'm wondering if I'm overlooked some more "appropriate" method of retrieving the text.The application I'm trying to automate is EasyCHM (whose demo version is fully functional).The methods I tried (and their effect) are listed below, as well as a screenshot of the window in question, along with the data AutoIt's Window Info is retrieving:$txt = ControlGetText ("","","[CLASS:FastFileEdit; INSTANCE:1]") ConsoleWrite ("txt: " & $txt & @CRLF) ; returns nothing $txt = ControlGetText ("[CLASS:TFormCompileStatus]","","[CLASS:FastFileEdit; INSTANCE:1]") ConsoleWrite ("txt: " & $txt & @CRLF) ; returns nothing $txt = WinGetText ("[CLASS:TFormCompileStatus]") ConsoleWrite ("txt: " & $txt & @CRLF) ; returns &Close WinActivate ("[CLASS:TFormCompileStatus]") ControlClick ("[CLASS:TFormCompileStatus]","","[CLASS:FastFileEdit; INSTANCE:1]") Send ("^A") Sleep (100) Send ("^C") $txt = _ClipBoard_GetData () ConsoleWrite ("txt: " & $txt & @CRLF) ; returns full content Edited January 22, 2012 by Frescard
JohnOne Posted January 22, 2012 Posted January 22, 2012 Probably because it is not a standard windows control (or window for that matter) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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