Sometimes a Simple Script Offers the Best Way to Learn More Advance Techniques in AutoHotkey
I’ve just posted a script written years ago by Robert Ryan (the person responsible for the very capable RegEx Tester) which displays hidden files by changing settings in your Windows Registry—a trick you can apply to many other Windows settings if you know where to find them.
The problem with setting folders or files to Hidden in their Properties window (right-click on selected folder or filename in Windows File Explorer and click Properties at the bottom of the menu) involves losing sight of them forever. Since the listing disappears from view, you can forget that it even exists. Windows offers a multi-step procedure for making all Hidden folders/files visible, but who can remember that? This simple UnHideFiles.ahk script saves the stress.
The UnHideFiles.ahk Script
I call Ryan’s script UnHideFiles.ahk to make its purpose easily understood. It doesn’t change the Hidden Property setting of individual folders/files, but merely toggle them from invisible to visible—and back again. When set to ✔Show Hidden Files, any Hidden listing appears as a faded selection. (The script adds the checkmark (✔) after activating the setting.) When turned off, it disappears again.

The script uses the RegRead command to read the current settings in the Windows Registry and the RegWrite command to change that setting. Careful study of the code shows how Ryan does it. You can use the same technique for virtually any other Windows Registry setting—although some require rebooting your computer for them to take effect.
I put a shortcut to my copy in the Tools menu of my QuickLinks.ahk app. Since some of the Hotkeys might interfere with my other Hotkeys, I plan to load only when I need it.
This post was proofread by Grammarly
(Any other mistakes are all mine.)
(Full disclosure: If you sign up for a free Grammarly account, I get 20¢. I use the spelling/grammar checking service all the time, but, then again, I write a lot more than most people. I recommend Grammarly because it works and it’s free.)
Hi, Jack,
Quick basic question: How do I create an array? I can’t find it in your book, and the AHK online help “Array” shows two examples, neither of which seem to work—I tried each, and every time they were flagged as “no value.” Can you give me a short example of a for-loop (or equivalent) using an array?
Thanks!
Tim Guymon
norikus@cox.net
LikeLike
Try these:
https://jacksautohotkeyblog.wordpress.com/2017/10/24/using-associative-arrays-to-solve-the-instant-hotkey-data-recall-problem-autohotkey-technique/
and
https://jacksautohotkeyblog.wordpress.com/2017/11/03/autohotkey-for-key-value-in-expression-loop-for-associative-arrays/
Also, I discuss an example of associative arrays in “Chapter Seventeen: Reduce Code and Increase Power with the AutoHotkey Input Command” of my book Beginning AutoHotkey Hotstrings.
LikeLike