PackUpAHK: One AutoHotkey Script Plus Every #Include, on Your Clipboard

Ever tried to show someone your AutoHotkey script, only to realize half of it lives in #Include files?

Paste just the main file into an AI chat or a forum post and the reader is missing the libraries, the helper functions, all of it.

PackUpAHK follows every #Include and puts the whole thing on your clipboard as one script. 😊

Video: easily pack up your AutoHotkey script
Watch it in action on YouTube

Pick the Main Script, Get Everything


Run PackUpAHK, click Browse, choose your main .ahk file and click Combine.

It reads the script and pastes in each included file where its #Include line was. Files that include other files get followed too, as deep as they go.

When it’s done, the combined script is on your clipboard and a message tells you so.

It Finds Includes the Way AutoHotkey Does


  • Library includes like <NotifyV2>: searched in the script’s Lib folder, your Documents\AutoHotkey\Lib and the AutoHotkey Lib folder
  • Relative and quoted paths like “lib\Helper.ahk”, plus %A_ScriptDir% paths
  • Each file only once: if two files include the same library, it’s pasted once, just like AutoHotkey does

Your indentation is kept exactly as you wrote it.

Easy to Read, Honest About Gaps


Every pasted file is wrapped in “Start of” and “End of” comment lines with its full path. Whoever reads it can see where each part came from.

Two warnings go into the output as comments:

  • Include not found: flagged right where the #Include was
  • Resource files: icons, images and other non-.ahk files your code points to are listed at the top, since they can’t be pasted as text
Right-click option: the first time you run PackUpAHK.ahk it offers to add a PackUpAHK item to the Explorer right-click menu for .ahk files. Say yes and you can pack any script without opening the window.

What’s in the Download


  • PackUpAHK.ahk: the AutoHotkey v2 script
  • bin\PackUpAHK.exe: the compiled version the right-click menu uses
  • lib and res folders: ScriptObject and the icon
Requirements: Windows and AutoHotkey v2. The right-click item is added only to your own user account, and only if you say yes.

Get PackUpAHK


PackUpAHK is $4.99. Handy any time you need to share a whole script, not just the top file.

One paste, full context. ⚡

Joe

Comments are closed.