AutoHotkey Community

It is currently May 27th, 2012, 4:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: September 24th, 2005, 9:51 am 
Offline

Joined: April 18th, 2005, 11:03 am
Posts: 14
Location: WI, USA
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2005, 1:26 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2005, 1:31 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2005, 7:11 am 
Offline

Joined: April 18th, 2005, 11:03 am
Posts: 14
Location: WI, USA
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn and 67 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group