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 

Need Help With UrlDownloadToFile

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
UrlDownloadToFile
Guest





PostPosted: Sat Jul 19, 2008 7:53 pm    Post subject: Need Help With UrlDownloadToFile Reply with quote

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. Confused

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. Very Happy

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

PostPosted: Sun Jul 20, 2008 2:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   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