Streamlining My Workflow with Custom AutoHotkey Scripts
Date Posted: 8/13/2025
As someone who spends considerable time working on various projects and switching between different applications, I've always been interested in ways to optimize my workflow. After repeatedly finding myself performing the same sequences of actions, I decided to automate these tasks using AutoHotkey. The result is a collection of custom scripts that have significantly improved my daily productivity.
Why AutoHotkey?
AutoHotkey is a powerful scripting language for Windows that allows you to automate almost anything by sending keystrokes, mouse clicks, and manipulating windows. What makes it particularly appealing is its ability to create custom hotkey combinations that can trigger complex sequences of actions with a single key press. This makes it perfect for repetitive tasks that would otherwise interrupt your flow state.
AI Assistant Quick Access
One of the most valuable aspects of my script collection is the quick access to various AI assistants. In today's development landscape, AI tools have become integral to productivity, but constantly switching between browser tabs or bookmarks can be disruptive.
My solution was to create dedicated hotkeys for each AI service I use regularly. Win + Numpad1 opens ChatGPT, Ctrl + Win + Numpad1 opens Lumo, Win + Numpad0 opens my local Open WebUI instance, Ctrl + Win + Numpad0 opens GitHub Copilot, and Alt + Win + Numpad1 opens Claude. Each script intelligently checks if the window already exists and activates it, or opens a new Firefox window if needed. The windows are automatically positioned and sized consistently, and set to always-on-top mode for easy reference while working.
The scripts include sophisticated window management logic. When opening an AI assistant, the script first checks if the window exists on a secondary monitor and moves it to the main screen if necessary to avoid resize issues. Then it positions the window precisely at coordinates that work well with my dual-monitor setup. This eliminates the manual positioning I used to do.
Development Tools Integration
Beyond AI assistants, the scripts provide quick access to essential development tools. Win + Numpad3 opens Notepad++ with a new file ready for editing.
File navigation is streamlined through Win + Numpad4, which opens Windows Terminal and automatically runs the lfcd
command. This integrates with the lf
file manager, providing a keyboard-driven file browsing experience. For administrative tasks, Ctrl + Win + Numpad4 does the same but with elevated privileges using sudo
.
Gaming Performance Optimization
An interesting aspect of the script collection addresses gaming performance through Lossless Scaling integration. Win + Numpad2 opens Lossless Scaling and automatically configures it for 2x frame generation, while Ctrl + Win + Numpad2 sets it to adaptive 165Hz mode. The script handles the complex positioning on secondary monitors and navigates through the interface programmatically, then activates the frame generation for the game.
Window Management
Two of my most frequently used hotkeys address window management pain points that Windows doesn't handle elegantly by default. Ctrl + Win + Down Arrow minimizes the current window while intelligently avoiding system windows like the desktop or taskbar, then automatically shifts focus to the next available window. Its counterpart, Ctrl + Win + Up Arrow, restores the most recently minimized window, creating an efficient minimize/restore workflow.
Technical Implementation
The scripts are built using AutoHotkey v2.0 and include several helper functions that ensure reliable operation. The ActivateWindowUntilActive
function repeatedly attempts to activate a window until it succeeds, handling cases where the first attempt might fail. WinLoaded
waits for windows to fully appear before proceeding with positioning or interaction.
A particularly important helper is WinKeyPressed
, which prevents additional shortcuts from being accidently pressed by the script. This avoids accidental system actions like locking the computer if the script sends 'L' while the Windows key is held down.
Each application script uses specific window titles or classes for detection, ensuring the scripts work consistently even when browser tabs change or applications update their interfaces. The Firefox-based tools use specific page titles, while native applications use their executable names or window classes.
Daily Productivity Impact
The cumulative effect of these automations is substantial. Tasks that previously required multiple steps, precise mouse positioning, and mental context switching now happen instantly with muscle memory keystrokes. The consistent window positioning means I always know where to look for specific tools, reducing cognitive load.
The journal integration through Win + Numpad5 automatically opens today's entry in Joplin, making daily note-taking frictionless. This seemingly small automation has dramatically improved my consistency.
Future Enhancements
The script collection continues to evolve based on my changing workflow needs. The modular nature of AutoHotkey makes these scripts easy to extend and modify. Each hotkey is self-contained, making it simple to add new applications or adjust existing behaviors without affecting the entire system.