AutoHotKey:从另一个脚本调用一个脚本

AutoHotKey:从另一个脚本调用一个脚本

问题描述:

我刚刚发现了AutoHotKey,它似乎成了梦想。我有两个.ahk脚本, A.ahk B.ahk 。我想从脚本A中调用脚本B.

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 script A.

AHK论坛在这个问题上有些奇怪,但我相信这是可能的。

The AHK forums are strangely silent on the subject but I am sure this is possible.

这是您正在寻找的#Include指令。你包括ScriptB.ahk,然后像往常一样调用它的函数。

It's the #Include directive you are looking for. You include ScriptB.ahk, then call its functions like you normally would.

#include SomeFile.ahk

http://www.autohotkey.com/docs/commands/_Include.htm