UrlDownloadToFile requirements

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Coderooney
Posts: 5
Joined: 23 Mar 2017, 22:41

UrlDownloadToFile requirements

20 Apr 2017, 19:50

I am losing my mind here. Here is the entirety of a script I'm trying to run:

Code: [Select all] [Download] GeSHi © Codebox Plus

UrlDownloadToFile, http://autohotkey.com/download/1.1/version.txt, AutoHotkey.txt

As basic as it gets, right? Nothing happens though! UrlDownloadToFile is working just fine in more complex scripts, but for some reason it doesn't work in simple ones like this.

Is there some other bit of code that a script needs to be able to use UrlDownloadToFile?
Nightwolf85
Posts: 87
Joined: 05 Feb 2017, 00:03

Re: UrlDownloadToFile requirements

20 Apr 2017, 20:04

I made a script with only that one line, and it works as expected. Meaning a file called AutoHotkey.txt appears in the same directory of the script, and contains the text 1.1.25.01.

I know this doesn't help solve your problem, but at least you know its not the code that is wrong. That's good right?
A_AhkUser
Posts: 163
Joined: 06 Mar 2017, 16:18
Location: France

Re: UrlDownloadToFile requirements

20 Apr 2017, 20:14

CodeRooney wrote:Nothing happens


Like NightWolf85 said the script works as expected.

The file is supposed to appear in %A_WorkingDir% (the script own directory by default) if an absolute path isn't specified like in your case.
Also make sure you don't run the script from a directory like "Program Files" directory (this will avoid issues related to write privileges).

With the code above a txt file should appear in your destkop:

Code: [Select all] [Download] GeSHi © Codebox Plus

UrlDownloadToFile, http://autohotkey.com/download/1.1/version.txt, %A_Desktop%/AutoHotkey.txt


Hope this helps.
User avatar
Coderooney
Posts: 5
Joined: 23 Mar 2017, 22:41

Re: UrlDownloadToFile requirements

21 Apr 2017, 01:12

Nightwolf, that is definitely good! It means there is some firewall/DNS issue going on. What is strange is that it works in my other scripts, which are much more complex than a single basic line and even use expressions within the UrlDownloadToFile line.

AhkUser, yeah nothing appears in the default working directory and just in case, I searched the whole computer. No results. Will have to delve into the network side of things rather than the code itself.

Thank you both for you confirmation at least— that lets me know where to look for the problem.
garry
Posts: 864
Joined: 22 Dec 2013, 12:50

Re: UrlDownloadToFile requirements

21 Apr 2017, 15:25

here 3 examples

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: aandf, Bing [Bot], need4speed, Rohwedder, smbs and 34 guests