thimker Posted January 4, 2005 Share Posted January 4, 2005 (edited) I have found that some sites of interest update automaticaly with URLDownloadToFile(), so a WHILE 1 loop with SLEEP() and a file name generator saves things nicely. Other sites manage to save the same *.htm content every loop pass with same script syntax. I also can SEND ("^r") to a browser in the active window, then SNagIt text to disk file. But this ties up the active window for screen capture to work. Is there an easy way to make the second type of web site to refresh before URLDownloadToFile()? If so, how might I Loop this to update and save. This would free up the active window (no screen capture needed), even allow multiple copies of script running. [Yes, I have SEARCHED and BROWSED the forum several times for this.] thnx Edited January 4, 2005 by thimker Link to comment Share on other sites More sharing options...
ezzetabi Posted January 4, 2005 Share Posted January 4, 2005 (edited) Use InetGet ( "URL", "filename", 1 ) and check if the newer file is equal or different than the older one. You may need a newer version of Autoit. E.g. InetGet('http://www.autoitscript.com/forum/index.php','c:\old.php',1) $sOld = FileRead('c:\old.php',FileGetSize('c:\old.php')) While 1 Sleep(60000) InetGet('http://www.autoitscript.com/forum/index.php','c:\new.php',1) $sNew = FileRead('c:\new.php',FileGetSize('c:\new.php')) If $sOld <> $sNew Then Filecopy('c:\new.php','c:\old.php') $sOld = $sNew InetGet('http://www.autoitscript.com/forum/index.php','c:\new.php',1) $sNew = FileRead('c:\new.php',FileGetSize('c:\new.php')) EndIf WEnd Edited January 4, 2005 by ezzetabi Link to comment Share on other sites More sharing options...
thimker Posted January 4, 2005 Author Share Posted January 4, 2005 Use InetGet ( "URL", "filename", 1 )and check if the newer file is equal or different than the older one.You may need a newer version of Autoit.<{POST_SNAPBACK}> Thanks for fast response.I got ver 3 and Beta on 12/31. The reason I showed URLDownloadToFile is that InetGet sometimes seems to do nothing, running under beta.The *.htm seem to be identical, certainly same visible content, but have new timestamps and different generated names (based on the time variables). 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