Skip to content

Run AHK scripts from Streamlabs Chatbot and pass parameters

License

Notifications You must be signed in to change notification settings

CrashKoeck/AHKParameters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AHKParameters for Streamlabs Chatbot

AHKParameters allows you to run AutoHotkey scripts from Streamlabs Chatbot in commands and also allows you to pass custom parameters directly to your AutoHotkey scripts.

Crash on the interwebs
Twitter | Twitch | YouTube | Patreon | Discord


Setup

  • Download the latest release of AHKParameters.zip from this page
  • Install and setup Python in Streamlabs Chatbot if you haven't already (Read the Streamlabs Chatbot documentation to see how to set up Python)
  • Import the script into Streamlabs Chatbot (Read the Streamlabs Chatbot documentation to see how to import scripts)
  • Right click on AHKParameters in the Streamlabs Chatbot script list and "Insert API key"
  • Install Autohotkey
  • Put your .ahk scripts into the AHKPScripts folder (open the scripts folder by clicking on the Open Scripts Folder button when the AHKParameters script is selected in Streamlabs Chatbot)
  • Set the AutoHotkey install directory. It's usually C:\Program Files\AutoHotkey (already set by default).

How to use

To trigger a script with no parameters, simply use $AHKP(scriptname).

If you want to pass parameters to your script, separate everything with commas. Start with your script name, then add as many parameters as you'd like separated by commas. $AHKP(scriptname,paramter1,parameter2,parameter3)

In your AutoHotkey script, you can access the parameters using A_Args. To get the first parameter, you'd use A_Args[1]. Second parameter would be A_Args[2]

A_Args loads all of the parameters into an array. You can take a look at the included example.ahk to get an idea of how it works.


Warning

  • Try to avoid special characters if possible as some will not properly pass through Chatbot. Characters that will definitely not work are double quotes, parentheses, and commas. "" () ,,

Future Plans

  • None. Let me know if there is something that should be added.

Support