 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Kerry
Joined: 20 Jul 2006 Posts: 144 Location: Los Angeles
|
Posted: Thu Jul 27, 2006 6:53 pm Post subject: How to make a download status box |
|
|
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 |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Thu Jul 27, 2006 6:57 pm Post subject: |
|
|
You could use a ToolTip, TrayTip, MsgBox, Progress/SplashImage or a GUI with a Progress control. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Thu Jul 27, 2006 7:14 pm Post subject: Re: How to make a download status box |
|
|
| 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,  _________________ URLGet - Internet Explorer based Downloader |
|
| Back to top |
|
 |
Kerry
Joined: 20 Jul 2006 Posts: 144 Location: Los Angeles
|
Posted: Thu Jul 27, 2006 8:11 pm Post subject: |
|
|
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
-Kerry |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3910 Location: Bremen, Germany
|
Posted: Thu Jul 27, 2006 8:39 pm Post subject: |
|
|
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 |
|
 |
Kerry
Joined: 20 Jul 2006 Posts: 144 Location: Los Angeles
|
Posted: Thu Jul 27, 2006 8:47 pm Post subject: |
|
|
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 |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2485
|
Posted: Fri Jul 28, 2006 12:45 am Post subject: |
|
|
| 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...  |
|
| Back to top |
|
 |
Kerry
Joined: 20 Jul 2006 Posts: 144 Location: Los Angeles
|
Posted: Fri Jul 28, 2006 1:23 am Post subject: |
|
|
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 |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Fri Jul 28, 2006 5:39 am Post subject: |
|
|
| 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  |
Sure Kerry !
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. -
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,
Edit: He has done it by calling multiple functions in WININET.DLL! _________________ URLGet - Internet Explorer based Downloader |
|
| Back to top |
|
 |
Whitespliff
Joined: 09 Feb 2006 Posts: 33
|
Posted: Fri Oct 20, 2006 6:28 am Post subject: |
|
|
@ 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 |
|
 |
Whitespliff
Joined: 09 Feb 2006 Posts: 33
|
Posted: Fri Oct 20, 2006 6:09 pm Post subject: |
|
|
No comments so I guess I got it right? _________________ In a world without walls and fences, who needs Windows and Gates? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Fri Oct 20, 2006 6:10 pm Post subject: |
|
|
| Whitespliff wrote: | | No comments so I guess I got it right? |
Try sending him a PM ( Personal Message )  _________________ URLGet - Internet Explorer based Downloader |
|
| Back to top |
|
 |
Whitespliff
Joined: 09 Feb 2006 Posts: 33
|
Posted: Fri Oct 20, 2006 6:19 pm Post subject: |
|
|
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 |
|
 |
A User Guest
|
Posted: Sun Sep 13, 2009 6:12 pm Post subject: Hi |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|