Linking AHK scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JC1874
Posts: 18
Joined: 14 May 2021, 06:55

Linking AHK scripts

14 May 2021, 07:08

Is there a way to link scripts in separate AHK files?

I have one login script that is used in multiple other scripts, can I call it from the other scripts without including it (the login script) in each one?
User avatar
boiler
Posts: 16903
Joined: 21 Dec 2014, 02:44

Re: Linking AHK scripts

14 May 2021, 10:03

You can run the script from your other scripts:

Code: Select all

Run, login.ahk
You might want to use RunWait depending on what you plan to do next.
User avatar
mikeyww
Posts: 26862
Joined: 09 Sep 2014, 18:38

Re: Linking AHK scripts

14 May 2021, 10:19

The #Include directive is also a way to include an external script without having to replicate the code directly in each "host" script. The directive takes care of that.
JC1874
Posts: 18
Joined: 14 May 2021, 06:55

Re: Linking AHK scripts

17 May 2021, 07:50

Thanks! I used RunWait and it works perfectly.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mmflume, ShatterCoder and 113 guests