
set ( 'Clipboard', "Copied text!" ) print ( isNotepadActive )įrom ahkunwrapped import Script ahk = Script ( ''' LuckyMinimize(winTitle).

f ( 'WinActive', 'ahk_class Notepad' ) # built-in variables (and user globals) can be set directly ahk. ) get(var) set(var, val) from ahkunwrapped import Script ahk = Script () # built-in functions are directly callable isNotepadActive = ahk. AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc.

Instead, we bundle and bridge AutoHotkey.exe, sending your initial script via stdin with minimal boilerplate to listen for window messages from Python and respond via stdout. I wanted to automate Windows with the coverage and simplicity of the complete AutoHotkey API, yet code in Python, so I created ahkUnwrapped.ĪutoHotkey already abstracts the Windows API, so another layer to introduce complexity and slowdowns is undesirable.
