AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

URLDownloadToFile Problem...

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TheLostBoy



Joined: 18 Apr 2005
Posts: 14
Location: WI, USA

PostPosted: Sat Sep 24, 2005 8:51 am    Post subject: URLDownloadToFile Problem... Reply with quote

Ok so for the fun of it I made a program that downloads stuff off the net (as if you couldn't tell by the subject line lol.)

Anywho I found a problem with it that I'm hoping you guys may be able to help me resolve.

I am on dialup and while downloading an online radio show I listen to I got kicked off and then the file I did have saved from the download thus far got deleted because the program was still running and it turned up a blank file I would assume.

Is there anyway to make a loop or some other function to check for internet connectivity so that if the connection gets severed that the program will automatically pause where its at and then resume when it dectects an active connection once again?

THANKS MUCH for any help in advanced!
_________________
"It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman
Back to top
View user's profile Send private message Visit poster's website AIM Address
BoBo
Guest





PostPosted: Sat Sep 24, 2005 12:26 pm    Post subject: Reply with quote

Code:
Run, rasphone.exe ,, Hide
WinWaitActive, Network Connections
IfWinNotExist, Network Connections, Hang &Up
   MsgBox, Connection seems still active ; as there is no HangUp-Button
WinClose, Network Connections
Weird brain flash.
Back to top
toralf



Joined: 31 Jan 2005
Posts: 3910
Location: Bremen, Germany

PostPosted: Sat Sep 24, 2005 12:31 pm    Post subject: Reply with quote

I guess the resume is the problem. I'm not sure if URLDownloadToFile can do that.
You may need to automate a download manager.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TheLostBoy



Joined: 18 Apr 2005
Posts: 14
Location: WI, USA

PostPosted: Sun Sep 25, 2005 6:11 am    Post subject: Reply with quote

BoBo's idea is a good one (by changing IfWinNotExist to IfWinExist) thus far, but it still doesn't quite work for pausing a download like I need...

Maybe it would help if I put of the code Smile...

Code:
#Persistent
#SingleInstance ignore
Process, priority, , Realtime
SetBatchLines -1


InputBox, dsvar, Doofy Downloader Thing, Please Enter an URL in the box: ,,,120

if ErrorLevel <> 0
   ExitApp

else

TrayTip, Doofy Downloader Thing, Currently Downloading %dsvar%, , 1

URLDownloadToFile, %dsvar%, %A_Desktop%\%dsvar%


does that help paint a picture of what I mean? Confused
_________________
"It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group