Deepr AHK Framework
Deepr is a modular and dynamic framework designed to help you organize, manage, and build complex AutoHotkey v2 scripts. It takes the guesswork out of structuring your project by using a simple settings.json file as the single source of truth, automatically generating the necessary #include directives and a convenient A_Path class to access your project files.
eee
Whether you want a fully managed framework for all your scripts or just want to browse a collection of useful, standalone AHK and Python modules, Deepr has you covered.
🛠️ Prerequisites
- AutoHotkey v2.0+: Download it from autohotkey.com.
- Python 3.x: Download it from python.org.
- Important: During installation, make sure to check the box that says "Add Python to PATH".
⚡ Core Features
- Dynamic Project Structure: No more manual
#includemanagement! Deepr's Python-based build script reads yoursettings.jsonand automatically generates the include files. - Smart Folder Detection: Simply add a new folder to your
Library, and the next time you run the launcher, Deepr will detect it and ask if you want to automatically add it to yoursettings.json. - Context-Aware Hotkeys: Automatically wrap hotkeys in
#HotIf WinActive(...)directives based on your settings, so your Premiere Pro shortcuts don't interfere with VS Code, and vice-versa. - Centralized Path Management: Generates an
A_Pathclass in AHK, giving you clean, intellisense-friendly access to all your project folders (e.g.,A_Path.Modules.PremierePro). - Modular Library: The entire framework is built around a
Libraryfolder, making it easy to grab individual modules (likeHandleKeyGestures,Application, orWindow) for use in your own projects. - Helpful Utilities: Includes standalone Python scripts for common tasks, like
Backup_Maker.pyto back up your project files.
🚀 Just Need a Specific Tool? (Standalone Modules)
You don't have to use the whole framework! Most components in the Library are designed to be portable. Feel free to browse the repository and download anything you find useful.
Notable Standalone Modules:
-
AHK Modules (
Library/AHK):HandleKeyGestures.ahk: A powerful function to create hotkeys that react differently to a Tap, Double-Tap, or Hold.Application.ahk: An advanced class for launching, focusing, or minimizing applications, with special handling for File Explorer paths and tabs.Window.ahk: Simple, effective functions to move and resize windows using your mouse.Modules/Premiere Pro: A suite of tools for Adobe Premiere Pro, including:Panel.ahk: Programmatically focus specific panels (e.CSS.Timeline,EffectControls).Paste.ahk: A "smart paste" that detects if you're pasting clips or keyframes and focuses the correct panel automatically.Motion.ahk: Uses ImageSearch to find and interact with effect properties like "Scale" and "Position" directly in the Effect Controls panel.
SideNote.ahk: A simple slide-out notepad GUI that docks to the right side of your screen.
-
Python Scripts (
Library/Pythons):Backup_Maker.py: A simple CLI tool that reads a list of files/folders from a text file (.config/.BackupMaker/Backup.txt) and copies them (preserving directory structure) to a singleBackupfolder.Template_Maker.py: A CLI tool to boilerplate new projects. Point it to a folder of templates, and it will ask you which one to copy and what to name the new project folder.
🚀 Quick Start (Using Framework)
This is the recommended way to use Deepr as a complete framework for your own scripts.
- Download: Grab the latest realease, it contains only
Launcher.ahkandmain.py. - Place Files: Put both files into a new, empty folder. This will be your project's root.
- Run: Double-click
Launcher.ahk.- A console window will appear. Because
settings.jsonis missing, the script will ask you to provide aRootNamefor your new project folder (e.g.,MyScripts). - The script will then automatically generate the default folder structure (
Library,.config) and all the necessary configuration files (settings.json,paths.ahk,.includes.ahk). - Finally, it will create and launch your main script (e.g.,
MyScripts.ahk).
- A console window will appear. Because
- Done! Your framework is ready. You can now start adding your own scripts to the
Libraryfolder.
🧩 How to Use & Add Modules
Deepr's main strength is how it handles new scripts. You don't need to manually edit settings.json or .include.ahk every time you add a new module.
Adding a New Module
-
Create a Folder: Create a new folder for your module inside
Library/AHK/Modules/. For example:Library/AHK/Modules/Photoshop. -
Add Scripts: Place your
.ahkfiles inside this new folder (e.g.,Photoshop_Hotkeys.ahk). -
Run Launcher: Run
Launcher.ahkagain. -
Auto-Configure: The build script will detect a new "unknown" folder (
Photoshop). It will ask you via a console prompt if you want to add this folder to yoursettings.json. -
Confirm: Press
a(for Add). The script will automatically updatesettings.jsonand add the new module to your.includes.ahkfile. -
Add Context (Optional):
- Open
.config/settings.json. - Find the new entry for "Photoshop".
- Add an
"Active"key to make all scripts in that folder context-sensitive:
{"name": "Photoshop","type": "Photoshop","Active": "ahk_exe Photoshop.exe", // This makes it context-sensitive"is_include": "true","is_path": "true"} - Open
Now, any hotkeys inside Photoshop_Hotkeys.ahk will only work when Photoshop is the active window.
💫 Customization (settings.json)
The settings.json file is the heart of your project's configuration. Here are the key properties you can use for each folder entry:
IMPORTANT: Do not add new folder entries to this file manually. Instead, create the physical folder in your project and re-run Launcher.ahk. The script will detect it and offer to add it for you. You should only edit this file to modify the properties of existing folders.
"name": (Optional) The name of the folder on your disk. If omitted, the"type"value is used as the folder name."type": (Required) The name used to generate the variable in theA_Pathclass. For example, a "type" of "MyScripts" becomes accessible viaA_Path.MyScripts."Active": (Optional) TheWinActivecondition for all scripts in this folder and its subfolders."ahk_exe MyProgram.exe": Scripts only run whenMyProgram.exeis active."Windows": Scripts will be global (part of the main script).- If omitted, scripts are global.
"is_include": (Optional, defaults to"true")"true": The build script will scan this folder (and its children) for.ahkfiles and#includethem."false": The build script will ignore this folder and all its children when looking for.ahkfiles.
"is_path": (Optional, defaults to"true")"true": This folder will be added to theA_Pathclass."false": This folder will be ignored by theA_Pathclass generator.
"children": (Optional) A list of nested folder objects that inherit properties (likeActive) from their parent.