 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
TheLostBoy
Joined: 18 Apr 2005 Posts: 14 Location: WI, USA
|
Posted: Sat Sep 24, 2005 8:51 am Post subject: URLDownloadToFile Problem... |
|
|
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 |
|
 |
BoBo Guest
|
Posted: Sat Sep 24, 2005 12:26 pm Post subject: |
|
|
| 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
|
Posted: Sat Sep 24, 2005 12:31 pm Post subject: |
|
|
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 |
|
 |
TheLostBoy
Joined: 18 Apr 2005 Posts: 14 Location: WI, USA
|
Posted: Sun Sep 25, 2005 6:11 am Post subject: |
|
|
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 ...
| 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?  _________________ "It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|