I just discovered AutoHotKey and it seems like a dream come true. I have two .ahk scripts, A.ahk
and B.ahk
. I want to call script B from within scr
Using an #include directive is more common, but occasionally you will need to call an external AHK script. This is easily accomplished using the Run or RunWait commands. While you can pass arguments to the called script through the command line you cannot call functions within it directly. Also, this approach will create a separate thread for the called script, but that may be the point.