Adding Startup Folder Shortcuts to a System Tray Menu (AutoHotkey Startup Control)

By Loading the Startup Folder Shortcuts into a Menu, We Can Access the Apps Even When No Icon Appears in the System Tray

Last time (“Collecting File Information from Windows Folders Using AutoHotkey“), I produced a simple MsgBox displaying the Windows shortcuts found in the Startup folder. When Windows launches, it reads and loads the programs or shortcut targets located in that folder. This provides AutoHotkey users an easy method for auto-loading their most-used scripts. However, the more scripts, the more clutter that appears in the System Tray in the form of AutoHotkey icons. You can reduce the crowding by adding the Menu,Tray,NoIcon command line to each script but then you need a technique for quickly reaching those hidden apps.

By inserting the shortcut names into a separate System Tray right-click context menu, you can both generate a list of shortcuts and provide quick access to the scripts. In this barebones AutoHotkey script, I create a menu that opens either the target script in Notepad (.ahk files) or the folder for the program (.exe files).

Continue reading

Collecting File Information from Windows Folders Using AutoHotkey

In Order to Manage Scripts Launched from the Windows Startup Folder, We Must First Know the Folder’s Contents

Last time in “Auto-Loading AutoHotkey Scripts When Booting Windows,” I highlighted the problem introduced by launching scripts from the Windows Startup folder on boot up—too many AutoHotkey icons in the System Tray might overwhelm the status bar. We can turn off the icons, but that’s like turning out the lights in an unlighted, windowless room full of furniture. You don’t know what’s where. We need a handy system for consolidating the information sitting in the Startup folder without making it too intrusive.

This time I demonstrate one technique for consolidating the Startup folder data for display. I have yet to settle on how I want to display the information and use the data. I see a number of possibilities:

  1. A single MsgBox listing the Startup shortcuts—the simplest, yet least flexible approach.
  2. A single System Tray icon right-click menu listing the Startup shortcuts—more flexible but limited in action creating techniques.
  3. A GUI window using a ListView control displaying the Startup folder’s shortcut data—the most flexible and powerful approach but more complicated to implement.
Continue reading

Auto-Loading AutoHotkey Scripts When Booting Windows

Add Shortcuts to Your Windows Startup Folder to Automatically Run Your Most Important Scripts

Every AutoHotkey user keeps a few favorite scripts at hand. Some people put them in one big master AHK file—auto-loading it when Windows boots. Others may use Windows Task Scheduler to initiate the apps. (See the “Windows Task Scheduler to Elevate Script Privileges” section of Chapter 16.1.4 of Jack’s Motley Assortment of AutoHotkey Tips.) Even more, add individual shortcuts to the Windows Startup folder for the preferred scripts. Each method has its advantages and disadvantages. In this blog, I visit AutoHotkey techniques for adding shortcuts to the Windows Startup folder.

Recently, a reader pointed out that the link for the AutoStartupToggle.ahk script at the Free AutoHotkey Scripts page pointed to the wrong script. I repaired the link then took a closer look at the script.

After selecting an AutoHotkey script (.ahk) or compiled app (.exe) in Windows File Explorer, the Ctrl+Win+3 key combination creates a shortcut in the Startup folder—auto-loading the script on bootup. If the matching shortcut exists in the Startup folder, that same Hotkey combination removes it. While this barebones routine works fine, I began considering the implications of using the Startup folder for all my regular scripts. This prompted me to dig deeper into the possibilities.

Continue reading