A_Downloads might be a nice thing to have at some point.

Propose new features and changes
User avatar
RaptorX
Posts: 388
Joined: 06 Dec 2014, 14:27
Contact:

A_Downloads might be a nice thing to have at some point.

19 Apr 2024, 17:08

I think we have a nice set of built-in variables that are flexible enough to do a lot of interesting things, but I keep thinking we are missing the A_Downloads variable that would point to the default location the downloads folder at in a similar fashion to A_MyDocuments!

Unless there is a technical reason preventing this, it sounds a bit better than EnvGet('SystemDrive') '\Users\' A_UserName '\Downloads' :D
Projects:
AHK-ToolKit
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: A_Downloads might be a nice thing to have at some point.

19 Apr 2024, 20:58

Code: Select all

; V1
RegRead, A_Downloads, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, {374DE290-123F-4565-9164-39C4925E467B}

; V2
A_Downloads := RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}")
autoexec
Posts: 24
Joined: 20 Feb 2023, 22:38

Re: A_Downloads might be a nice thing to have at some point.

20 Apr 2024, 02:43

or

Code: Select all

A_Downloads := ComObject('Shell.Application').NameSpace('Shell:Downloads').Self.Path
User avatar
RaptorX
Posts: 388
Joined: 06 Dec 2014, 14:27
Contact:

Re: A_Downloads might be a nice thing to have at some point.

20 Apr 2024, 06:25

yeah! those are great! i have used the one @autoexec posted before...

but hear me out: how about just A_Downloads?? :D

That way you don't have to find those in the forums every time you need it? just type A_Downloads and you are good to go. xD
Projects:
AHK-ToolKit
User avatar
Animan8000
Posts: 58
Joined: 11 May 2022, 05:00
Contact:

Re: A_Downloads might be a nice thing to have at some point.

24 Apr 2024, 07:22

RaptorX wrote:
19 Apr 2024, 17:08
I think we have a nice set of built-in variables that are flexible enough to do a lot of interesting things, but I keep thinking we are missing the A_Downloads variable that would point to the default location the downloads folder at in a similar fashion to A_MyDocuments!

Unless there is a technical reason preventing this, it sounds a bit better than EnvGet('SystemDrive') '\Users\' A_UserName '\Downloads' :D
A little unrelated, but I generally don't recommend using "A_UserName" for trying to find subfolders (downloads, pictures, etc.) of a user folder. Because A_UserName contains only the username, and not necessarily the user folder name. Depending on how Windows is installed, the script can break, if the user folder is for example shortened by Windows automatically. For example fully reinstalling Windows locally without an external drive (USB for example) did typically shorten the user folder name to only 5 characters, effectively making A_UserName pointless in this situation, and I used A_AppData instead, and went to the folder above, to avoid that inconsistency
User avatar
RaptorX
Posts: 388
Joined: 06 Dec 2014, 14:27
Contact:

Re: A_Downloads might be a nice thing to have at some point.

24 Apr 2024, 10:37

Animan8000 wrote:
24 Apr 2024, 07:22
RaptorX wrote:
19 Apr 2024, 17:08
I think we have a nice set of built-in variables that are flexible enough to do a lot of interesting things, but I keep thinking we are missing the A_Downloads variable that would point to the default location the downloads folder at in a similar fashion to A_MyDocuments!

Unless there is a technical reason preventing this, it sounds a bit better than EnvGet('SystemDrive') '\Users\' A_UserName '\Downloads' :D
A little unrelated, but I generally don't recommend using "A_UserName" for trying to find subfolders (downloads, pictures, etc.) of a user folder. Because A_UserName contains only the username, and not necessarily the user folder name. Depending on how Windows is installed, the script can break, if the user folder is for example shortened by Windows automatically. For example fully reinstalling Windows locally without an external drive (USB for example) did typically shorten the user folder name to only 5 characters, effectively making A_UserName pointless in this situation, and I used A_AppData instead, and went to the folder above, to avoid that inconsistency
Totally correct, I usually use the above code only on my machine for quick scripts but I totally forgot that installing the "offline" version of windows messes with the User folder for whatever reason.

But basically that is part of my argument, instead of having to rely on workarounds to find that folder I think it would be a nice addition to have it behave as the builtin variables for "A_AppData" or "A_MyDocuments".

The reason why I think this might not get implemented is that people can change the location of the Downloads folder (which is something I do) by going to the preferences and setting the downloads location to a new place like this:
image.png
(20.11 KiB) Downloaded 33 times
But I would say you can do the same with "My Documents" but I am not sure how "A_MyDocuments" react to that... does it point to the new location, if it does, then I would have the same expectation for the proposed "A_Downloads".
Projects:
AHK-ToolKit

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 8 guests