 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
UrlDownloadToFile Guest
|
Posted: Sat Jul 19, 2008 7:53 pm Post subject: Need Help With UrlDownloadToFile |
|
|
I can't get UrlDownloadToFile to work properly. I don't know what I'm doing wrong. I tried out the example, and it works perfectly, but when I try to use it, nothing happens.
Example:
| Code: |
UrlDownloadToFile, http://www.autohotkey.com/download/CurrentVersion.txt, %A_ScriptDir%\AutoHotkey Latest Version.txt
|
My Code 1:
| Code: |
InputBox, username, User Name, Please enter a user name.
if ErrorLevel
Return
else {
UrlDownloadToFile, http://hiscore.runescape.com/index_lite.ws?player=%username%, %WinDir%\TEMP\Hiscores.tmp
FileRead, Hiscores, %WinDir%\Temp\Hiscores.tmp
MsgBox, %Hiscores%
}
Return
|
My Code 2:
| Code: |
xx = 0
Loop 9 {
xx += 1
UrlDownloadToFile, http://website.com/wallpapers/00%xx%.jpg, %A_WorkingDir%\Files\00%xx%.jpg
}
xx = 9
Loop 90 {
xx += 1
UrlDownloadToFile, http://website.com/wallpapers/0%xx%.jpg, %A_WorkingDir%\Files\0%xx%.jpg
}
xx = 99
Loop 176 {
xx += 1
UrlDownloadToFile, http://website.com/wallpapers/%xx%.jpg, %A_WorkingDir%\Files\%xx%.jpg
}
Return
|
However, this code works great, then I can use a download manager to download all the files.
Quick Fix Code 2:
| Code: |
xx = 0
Loop 9 {
xx += 1
FileAppend, <A HREF="http://website.com/wallpapers/00%xx%.jpg">Link</A><BR>`n, Links.html
}
xx = 9
Loop 90 {
xx += 1
FileAppend, <A HREF="http://website.com/wallpapers/0%xx%.jpg">Link</A><BR>`n, Links.html
}
xx = 99
Loop 176 {
xx += 1
FileAppend, <A HREF="http://website.com/wallpapers/%xx%.jpg">Link</A><BR>`n, Links.html
}
Return
|
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6084
|
Posted: Sun Jul 20, 2008 2:48 am Post subject: |
|
|
| Code: | InputBox, username, User Name, Please enter a user name.
if ErrorLevel
Return
else {
url=http://hiscore.runescape.com/index_lite.ws?player=%username%
UrlDownloadToFile,%url%, %WinDir%\TEMP\Hiscores.tmp
FileRead, Hiscores, %WinDir%\Temp\Hiscores.tmp
MsgBox, %Hiscores%
}
Return |
Does this help? _________________
 |
|
| 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
|