Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

AutoHotkey.DLL parallel script execution

  • Please log in to reply
1 reply to this topic
  • New members
  • 3 posts
  • Last active: Sep 14 2016 09:47 AM
  • Joined: 03 Aug 2015

In my C++ project I need to run two AHK scripts in parallel. 

I am running AHK script #1 with ahkdll() call in the first application thread and wait until the end of script with ahkReady() in a loop.

Then I run AHK script #2 with ahkdll() call in the second application thread first script is stopped immediately.

There is also main GUI thread that process messages from script threads.


Here  https://ahknet.autoh...ahkdll-txt.html documentation states that:

ahkdll is used to start an AutoHotkey script from file in separate thread.


So what is correct way to run two scripts in parallel with use of AutoHotkey.DLL?


I have tried AutoHotkey_H DLL UNICODE/32/Multi-threaded versions 1.1  and v2.0 alpha.

  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008

Simply copy and rename AutoHotkey.dll so you have 2 of them and you can run 2 Threads.