jmoskie Posted December 18, 2009 Share Posted December 18, 2009 I've had two other threads here so far, and they've both been extremely helpful in getting my first public AutoIt program off the ground. I've just going one more annoying issue. As mentioned before, my program is a screen scraper. I have a loop where the program finds the window and uses WinGetText($window) to read the text from the window. This works perfectly most of the time, but sometimes it will only get a partial read. This is causing my Array Out of Bounds errors that I mentioned in a previous thread, but I've gotten to script to gracefully handle those. I'm curious why sometimes I'll only get a partial scrape. What could cause this? No errors are being reported that I can see. Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2009 Share Posted December 19, 2009 (edited) I'm curious why sometimes I'll only get a partial scrape. What could cause this? No errors are being reported that I can see. WinGetText -------------------------------------------------------------------------------- Retrieves the text from a window. WinGetText ( "title" [, "text"] ) Remarks Up to 64KB of window text can be retrievedIf you have large text in that win this can b your problem Did you try with ControlGetText? Edited December 19, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
jmoskie Posted December 19, 2009 Author Share Posted December 19, 2009 The majority of the time, all of the text is retrieved successfully. As mentioned before, this text getting is in a loop, and immediately before the partial scrape, I got a full scrape of the entire window, which is more than double the length of the partial one. Dumping the partial scrape to disk, it's < 4KB. I don't think I'm hitting this issue. I'll play around with ControlGetText. Hopefully the controls on the program I'm scraping are labeled well. Link to comment Share on other sites More sharing options...
jmoskie Posted December 19, 2009 Author Share Posted December 19, 2009 ControlGetText doesn't seem like a viable option. The controls all seem to be custom, even the text boxes and buttons. Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2009 Share Posted December 19, 2009 Can you at least post your code, 3 threads and you did not post the script that your haveing problems with. Did you try to read it 2 times and compare it if first win read and second are identical? Maby that win is still writing while your trying to get text? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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