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 

How to make a download status box

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



Joined: 20 Jul 2006
Posts: 144
Location: Los Angeles

PostPosted: Thu Jul 27, 2006 6:53 pm    Post subject: How to make a download status box Reply with quote

Does anyone have an idea? I would like to pop up a window showing the status of a download so that people don't think my script (which downloads some programs) isn't just sitting there

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
polyethene



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Thu Jul 27, 2006 6:57 pm    Post subject: Reply with quote

You could use a ToolTip, TrayTip, MsgBox, Progress/SplashImage or a GUI with a Progress control.
_________________
GitHubScriptsIronAHK Contact by email not private message.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Thu Jul 27, 2006 7:14 pm    Post subject: Re: How to make a download status box Reply with quote

Kerry wrote:
I would like to pop up a window showing the status of a download


I am using a third party DLL ( own use! ) & the problem is it displays some garbage.
I have mailed the author a week back and did not get a reply! I accept the garbage, &
it does a terrific job, and easy to DllCall!



I will let you know if the author responds and sets it right.

Regards, Smile
_________________
URLGet - Internet Explorer based Downloader
Back to top
View user's profile Send private message Send e-mail
Kerry



Joined: 20 Jul 2006
Posts: 144
Location: Los Angeles

PostPosted: Thu Jul 27, 2006 8:11 pm    Post subject: Reply with quote

Hey Titan, those were good ideas (I had been searching for status, not progress), the only problem is that URLDownloadFile doesn't go to the next step until it's completely downloaded (which I just discovered), so I probably will have to call a DLL like Goyyah is doing

And Goyyah, do you know where I could get the DLL? Even if it does display garbage? Maybe I could send him an e-mail too and he'll realize its something that needs to be fixed Smile

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
toralf



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

PostPosted: Thu Jul 27, 2006 8:39 pm    Post subject: Reply with quote

Do you know the file size before you start to download? E.g. on ftp site the file size is specified. If so, you could monitor the file size on your disc with a timer and calculate the percentage of download. I did such a thing for one app of mine which uses cURL to download form a ftp site. Before I had shown the user the listing, so I already had the size. But the same should be possible without showing the user the listing. The listing should be fairly small in size so it should be fast to download.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kerry



Joined: 20 Jul 2006
Posts: 144
Location: Los Angeles

PostPosted: Thu Jul 27, 2006 8:47 pm    Post subject: Reply with quote

I can use HttpQueryInfo to get the file size... but the thing is I can't get it to do anything else while its doing the download

do you know (maybe this is what you were saying) if I can set a time before the install that will continue to do so while it is installing?

-Kerry
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
corrupt



Joined: 29 Dec 2004
Posts: 2485

PostPosted: Fri Jul 28, 2006 12:45 am    Post subject: Reply with quote

Kerry wrote:
I can use HttpQueryInfo to get the file size... but the thing is I can't get it to do anything else while its doing the download
Maybe try using a timer... Wink
Back to top
View user's profile Send private message Visit poster's website
Kerry



Joined: 20 Jul 2006
Posts: 144
Location: Los Angeles

PostPosted: Fri Jul 28, 2006 1:23 am    Post subject: Reply with quote

hmmm can anyone tell me why this isn't working? (trying a timer)

Download(path, dLocation)
{
Critical
SetTimer, Pop, 2000
UrlDownloadToFile, %dLocation%, %path%
Return
}
Pop:
{
MsgBox First time!
}

it seems to still freeze on the URL downloadtofile

-Kerry

P.S. I'll add the actual progress bar when I'm sure I can make something popup will work
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1687

PostPosted: Fri Jul 28, 2006 1:51 am    Post subject: Reply with quote

here's a working example
http://www.autohotkey.com/forum/viewtopic.php?p=11105#11105
Smile
_________________
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Fri Jul 28, 2006 5:39 am    Post subject: Reply with quote

Kerry wrote:
Goyyah, do you know where I could get the DLL? Even if it does display garbage? Maybe I could send him an e-mail too and he'll realize its something that needs to be fixed Smile


Sure Kerry Smile!

Here is the Download Link: http://istool.org/default.aspx/downloads
Contact : istool_AT_istool.org

The mail I sent :

Quote:
Dear Mr. Bjørnar Henden,

Let me first say that I am very much impressed with isxdl.dll .
I tried it with AutoHotkey scripting language and it is simply great!!

However I am getting a small glitch, maybe due to some bug in my coding.
Please view the snapshot: http://autohotkey.net/~goyyah/AHK/Image1.png
This is the code : http://autohotkey.net/~goyyah/AHK/Download_AutoHotkey.ahk
The numbers appears as garbage. Sad -

AutoHotkey is a very easy scripting language and is very powerful to automate
various tasks in Windows. Download: http://www.autohotkey.com/download/

The forum is here and you can find me with my nick "Goyyah" : http://www.autohotkey.com/forum

I hereby seek permission (non-commercial) to use it for my routine download tasks
( I am just a single PC - home user).

I also seek permission to publish my code & provide a download link for your wonderful DLL.

Please revert back.

Thanks & Regards,

A N Suresh Kumar,
Chennai - INDIA


An example to Call the DLL : Download_AutoHotkey.ahk

Regards, Smile

Edit: He has done it by calling multiple functions in WININET.DLL!
_________________
URLGet - Internet Explorer based Downloader
Back to top
View user's profile Send private message Send e-mail
Whitespliff



Joined: 09 Feb 2006
Posts: 33

PostPosted: Fri Oct 20, 2006 6:28 am    Post subject: Reply with quote

@ Titan
Is this a good way to use what you said?
Filesize = 1350KB
Code:
   IniRead, Dversion, radio.ini, Dversion, key
   Progress,  h94 w220, One moment please, Winamp v%Dversion%`nis downloading, Winamp install
   WinActivate, Winamp install
   #Persistent
   SetTimer, ADD, 250
   UrlDownloadToFile, http://dvd.puppyfoon.com/uploads/MuxMan/%Winstall%, %Winstall%
   Sleep, 1000
   Progress, Off
   SetTimer, ADD, off
   RunWait, %Winstall%
return

ADD:
   SetBatchLines, -1
   FileGetSize, size, %Winstall%, K
   if size > 0
      Progress, 15
   if size > 250
      Progress, 20
   if size > 375
      Progress, 30
   if size > 500
      Progress, 40
   if size > 625
      Progress, 50
   if size > 750
      Progress, 60
   if size > 875
      Progress, 70
   if size > 1000
      Progress, 80
   if size > 1125
      Progress, 90
   if size > 1230
      Progress, 100
return
It seems to work but it with small files it sometimes does only 2 or 3 updates, size isn't updated fast enough?
_________________
In a world without walls and fences, who needs Windows and Gates?
Back to top
View user's profile Send private message
Whitespliff



Joined: 09 Feb 2006
Posts: 33

PostPosted: Fri Oct 20, 2006 6:09 pm    Post subject: Reply with quote

No comments so I guess I got it right?
_________________
In a world without walls and fences, who needs Windows and Gates?
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Fri Oct 20, 2006 6:10 pm    Post subject: Reply with quote

Whitespliff wrote:
No comments so I guess I got it right?


Try sending him a PM ( Personal Message ) Smile
_________________
URLGet - Internet Explorer based Downloader
Back to top
View user's profile Send private message Send e-mail
Whitespliff



Joined: 09 Feb 2006
Posts: 33

PostPosted: Fri Oct 20, 2006 6:19 pm    Post subject: Reply with quote

PM'ed Titan...

This is a working ex:
Code:
   IniRead, Dversion, radio.ini, Dversion, key
   Progress,  h94 w220, One moment please, Winamp v%Dversion%`nis downloading, Winamp install
   WinActivate, Winamp install
   #Persistent
   SetTimer, ADD, 50
   UrlDownloadToFile, http://dvd.puppyfoon.com/uploads/MuxMan/%Winstall%, %Winstall%
   Sleep, 1000
   Progress, Off
   SetTimer, ADD, off
   RunWait, %Winstall%
   return

   ADD:
      total = 1350 ; total size in KB
      FileGetSize, size, %Winstall%, K ; get current size
      value := (size / 1350) * 100 ; how much percent (%) complete
      Progress, %value% ; set progress the percent complete
   Return

_________________
In a world without walls and fences, who needs Windows and Gates?
Back to top
View user's profile Send private message
A User
Guest





PostPosted: Sun Sep 13, 2009 6:12 pm    Post subject: Hi Reply with quote

Did Bjørnar Henden respond to you?
If not, will you ask him again or shall i ask it?
Greetings,
A User
Back to top
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