bobheart Posted June 14, 2004 Share Posted June 14, 2004 I want to use this and each time it grabs a url it changes the html a new name or maybe just adds a number to it so it won't over write the lat one . I want to grab a bunch of pages but don't want to rename it each time . $answer = InputBox("Question", "Will save a temphtml.html in your E: folder ", "add url here", "", -1, -1, 30, 30) URLDownloadToFile ($answer,"E:\live journal backup\temphtml2.html") Link to comment Share on other sites More sharing options...
pekster Posted June 14, 2004 Share Posted June 14, 2004 (edited) How about creating a for loop to the most files you want to store, and then cycling through the loop until the file doesn't exist? Like this:$answer = InputBox("Question", "Will save a temphtml.html in your E: folder ", "add url here", "", -1, -1, 30, 30) $moreRoom = 0 For $i = 1 To 100;change this to be the most files you wish to store If FileExists("E:\live journal backup\temphtml" & $i & ".html") Then ContinueLoop $moreRoom = 1 ExitLoop Next If $moreRoom = 0 Then;if this happends, we filled up all 100 of the files MsgBox(0, "Filled Up", "No more room to store fles") Exit EndIf URLDownloadToFile ($answer,"E:\live journal backup\temphtml" & $i & ".html")Corrected code Edited June 14, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
bobheart Posted June 14, 2004 Author Share Posted June 14, 2004 Well it look good but not sure what happen ? --------------------------- AutoIt Error --------------------------- Line 4 (File "E:\Programs\AutoIt3\Examples\june13\graburl.au3"): If FileExists("E:\live journal backup\temphtml" & $i & ".html") Then ContinueLoop If FileExists("E:\live journal backup\temphtml" & ^ ERROR Error: Variable used without being declared. --------------------------- OK --------------------------- I don't know this Variable stuff at all . Link to comment Share on other sites More sharing options...
pekster Posted June 14, 2004 Share Posted June 14, 2004 I messed up and wrote For $1 = 1... which I shouldn't have done. The above code has been corrected. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
bobheart Posted June 14, 2004 Author Share Posted June 14, 2004 Right on the mark that time .. thank you for the help .. 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