Sign in to follow this  
Followers 0
bobheart

Hi I'm back with more dumb stuff ..

5 posts in this topic

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")

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

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 .

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Right on the mark that time .. thank you for the help ..

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0