cutedog09 Posted December 3, 2005 Share Posted December 3, 2005 I've observed that ControlGetText fails wen the text of the control is changing constantly.(eg %download) So does anybody has any alternative other than ControlGetText to extract text of a control whose text is continuously changing??? (Actually i want to extract the file size from a control which says something like : '8% of 56.2mb downloaded' the % keeps changing so i am not able to extract the text using ControlGetText ) Link to comment Share on other sites More sharing options...
LxP Posted December 4, 2005 Share Posted December 4, 2005 When you say that ControlGetText() fails, what do you mean exactly? Does it return nothing and set @Error? I've never had any problem observing rapidly changing (short) text with it. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 4, 2005 Moderators Share Posted December 4, 2005 (edited) So does anybody has any alternative other than ControlGetText to extract textPencil and Paper?Edit:You know the more I think about it LxP, we ran into something like this a while ago w/ the "ControlNameNN" changing... Wonder if something like that might be causing the issue?? Edited December 4, 2005 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Valuater Posted December 4, 2005 Share Posted December 4, 2005 I think what he wants is to up-date a download to a label or somethingif that be the case... there are a bunch of download scripts in this posthttp://www.autoitscript.com/forum/index.ph...pic=18662&st=0#good luck8) Link to comment Share on other sites More sharing options...
cutedog09 Posted December 4, 2005 Author Share Posted December 4, 2005 Thanx for the replies..@LxP...When you say that ControlGetText() fails, what do you mean exactly?Even though @Error is 0 but i get "" (empty string)Actually i'm trying to automate download of many files one-by-one whose url's r a txt document.The site doesn't support download accelarators so i'm using Internet Explorer to do it.So my steps r:1.Copy& Paste the url from the txt document to the address bar of IE and hit go. (done)2.From the small window which shows me progress of download i want to extract the file size and compare it with the file size wen the window shows 'download complete'(I hav to do this b'cos of the peculiar nature of the site as many of the times it shows me 'download complete' even wen it hasn't downloaded fully)3.If the script detects partial download in the above step then restart the download.I'm stuck in step 2 as i'm not able to extract the file size from the control using ControlGetText() even though the text of the control mentions the full size of the file (control text says: '1.73mb of 7.8mb downloaded' but i'm unable to extract this txt. using ControlGetText() )Or is there any way i can extract the file size from the site's server? Link to comment Share on other sites More sharing options...
jefhal Posted December 4, 2005 Share Posted December 4, 2005 (edited) Why not use the InetGet and InetGetSize functions? Get the size of the file on the website, then compare that to the size of the file that is downloaded. In fact, InetGet will keep running until the file is completely downloaded I believe. It goes to the next step in the script when it's done. Also, if the file does not exist locally until it is totally downloaded, use the if fileexists to check and when it does exist do the file size compare if you have to. Edited December 4, 2005 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
cutedog09 Posted December 5, 2005 Author Share Posted December 5, 2005 @jefhal...Thanx!!! these functions look interesting I think i may b able to solve my prob now Thanx everyone! who replied with suggestions..... this forum ROCKS!!! 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