How To Script Streamdeck with Autohotkey

Getting To Know The El Gato Stream Deck Part 2

January 3, 2018

The Elgato Stream Deck is a powerful control surface add-on for colorists, especially when paired with autohotkey. In this insight, learn to take that functionality to the next level with advanced scripts and workflow examples.


Series
Day 3: 24 Insights in 24 Days 2018 New Year Marathon

Taking the Stream Deck to the next level

I’ve made no secret of my love for the Elgato Stream Deck. When I first discovered the product, I immediately saw its potential to help colorists work faster and smarter. Since then, I’ve been using it myself and recommending it to other colorists.

After convincing Robbie to buy one for himself, he published a fantastic insight giving a broad overview of the Stream Deck. Unfortunately, there was one big disadvantage: The Stream Deck is designed for gamers, not colorists. A lot of its built-in functionality isn’t things colorists will use. Our main focus is on its ability to hit hotkeys, and to launch external programs – and it’s that ability to launch an external program that can really open up the Stream Deck’s potential..

Autohotkey and Stream Deck

In Part 1, we introduced autohotkey, an open source scripting language designed to build keyboard and mouse macros. In this Insight, I’m going to show you ways to use autohotkey to take that functionality to the next level. Each autohotkey script can be instantly launched from the Stream Deck, and can not only can you take control of your mouse and keyboard, but you can actually do logic and file I/O for saving settings or values.

Weather you use a Stream Deck, or any other macro controller capable of launching external programs – I’ll give you an overview on how to use autohotkey to unleash the full potential of advanced macros for color grading work.

About Stream Deck 2.0 Public Beta

While originally designed as a gaming peripheral – Elgato has recognized the potential of the Stream Deck for professional workflows, and has recently released a public beta of Stream Deck 2.0. This release includes new features squarely aimed at professionals like colorists. Specifically, they’ve added smart profiles to use the Stream Deck with multiple applications, and the ability to combine multiple Stream Decks to expand the number of buttons available.

The upcoming 2.0 release of the Stream Deck software has a number of improvements for professional users, including multiple device support and smart profiles.

Links & Bonuses

  • Download 3 Scripts – For Premium members, I’ve made the 3 scripts explained in this Insight available as examples for you to download. Just keep in mind – these scripts are tuned to my specific machine, and my specific display resolution (I’ve tested against 1920×1080 and 2560×1600); they may not work on all systems right out of the box but if you have Resolve set to fullscreen, in my testing the menus don’t change much from resolution to resolution. Still, you might need to adjust some mouse coordinates and delay times to optimize them for your system. Consider these as examples to help you get started more quickly.For Premium members, the download link for the scripts is below the video.
  • Stream Deck 2.0 Public Beta – As with all beta software, back up your profiles before upgrading, and upgrade at your own risk. If you are in the middle of crucial projects, I would hold off on upgrading until you have time to troubleshoot any issues that may come up.
  • Visual Studio Code – Microsoft Visual Studio code is my preferred editor for Autohotkey scripts.

Enjoy and leave comments or examples of your scripts in the comments below!

-joey

Member Content

Sorry... the rest of this content is for members only. You'll need to login or sign up to continue (we hope you do!).

Membership options
Member Login

Additional Downloads

Sorry... downloads are available for Premium Members only.

Become a Premium Member

Comments

20 thoughts on “Getting To Know The El Gato Stream Deck Part 2”

    1. Thanks! Yea I already have 2, but I’m going to get a 3rd soon – I have this crazy idea of remoting it out and hard wiring/permanently mounting it into the armrest of the couch in my suite – so I can setup a set of transport/marker/etc controls for reviewing grades on my big LG OLED.

    1. The good news is theres a decent amount of excitement about the stream deck in the open source community – so even if official Linux support doesn’t exist, I think we’ll see some open source Linux support eventually.

      Theres 2 very basic open source projects out there already:
      https://github.com/Lange/node-elgato-stream-deck
      https://github.com/WElRD/StreamDeckCore

      Currently these are just APIs, so any user facing functionality would have to be hand-coded. I’ve tested the node.js one, and it does work. Hopefully someone in the open source world will come with a user-facing application similar to the native windows one that works in Linux, that could be really cool.

      1. that would be awesome! please keep us posted! i wrote an email to the official developers as well, and they replied: “Thank you for your suggestion, I will forward this through the appropriate channels, so it could possibly implemented in future releases! ” well, lets “hope for deliverance” with paul mccartney 🙂

  1. Fantastic device, and Insight ! Problem is AutoHotKey is PC only. As suggested by Robbie in part 1, I have downloaded Keyboard Maestro for Mac and give it a try. It goes less deep than the programming level you’re showing here (no I/O on disk for example), but if I manage to get something useful, I’ll let members know. Good work Joey.

    1. Thanks! Yes, unfortunately the mac options aren’t as good (which seems to be an industry trend these days). But I’ve been told that Elgato is going to be implementing their own native macro support eventually – if that happens (like keyboard maestro, it’s unlikely to be as advanced as AHK, but still way more useful then simple hotkeys) – The potential for mac users will be much better.

      I’ll say this – I’ve been running the stream deck for about 6 months now, and in that short time they have pushed out multiple big feature updates at a fast pace. They seem to be pretty committed to maximizing the device through software improvements, which is a great thing.

    1. Keyboard Maestro has, probably, 98% of what most users need though. And HammerSpoon is super duper powerful but requires in-depth understanding of lua and programming.

      If you want to see what you can do with it, check out the FCPX helper app, CommandPost (they even have a streamdeck module built in). CommandPost is developed in and runs on HammerSpoon, so you can get very very sophisticated with it.

  2. Can someone give an example of how they launch a Keyboard Maestro macro from StreamDeck? Do you have to also write an applescript to call the macro? I’m having trouble getting it to work…

    1. I’m just starting to play with keyboard maestro – so i’m not 100% sure on this, but in the macro editor, under the “trigger” menu – there is a dropdown menu to trigger the macro via a script. If you drop that down and select “by shell script” – it gives you a command you can copy and paste into a shell to trigger the macro.

      i’m thinking that may work if you paste it into the streamdeck application (thought I haven’t tested this yet – my only mac is running an older version of mac os that the streamdeck software doesn’t support – once I get it updated, I’ll be able to come back with more real-world info)

    2. I have it working now, with two Stream Decks. I use the Open action to open Applescripts which either call a Keyboard Maestro macro or just manipulate the menu items of Resolve directly. It’s a lot of work (making nice icons takes some time too), but I am very happy with the results. I may get a third!

      BTW, one current frustration, which they might fix in a future rev of the software, is that you can’t have one Streamdeck change the profile on the other. I found a workaround by scripting mouse clicks, but it’s a little janky…

    3. In Keyboard Maestro, set your trigger (Triggered by any of the following:) to “Or by Apple Script”.

      Keyboard Maestro will autogenerate an AppleScript for you. Copy it and paste it into AppleScript and save it.

      Then set your Stream Deck to open that AppleScript and it will trigger Keyboard Maestro.

  3. Hi, this looks great. Is there anyway to use the scripting with OpenFX effects? I guess it would need a script to scroll through the effects, unless I guess you could program it to move the mouse to the search box and enter the name of the effect, which would then bring to the top, and then program a mouse click on it? But then how would you be able to program it to move the effect onto the node, since the node position will change with every node tree you create? It would be amazing to be able to shortcut OpenFX since these can be quite time consuming to apply and require mouse moves, and often I use the same settings everytime I apply an effect.

    1. Yea I think as it stands right now, trying to do an AHK script to navigate the OFX menu would be very difficult.
      BUT – resolve 15’s new integration of python and lua holds some powerful possibilities. I’m starting to explore the idea of using the streamdeck to call python scripts to control resolve.

      lots of possibility there, but the API is still very much in development and changing and not fully documented yet. Stay tuned – there could be some really cool stuff coming.

  4. does anyone have problem with their stream deck working? mine works perfectly on one of my pc but on my main workstation resolve does not recognize any key. any help?

Leave a Reply

Hundreds of Free Tutorials

Get full access to our entire library of 900+ color tutorials for an entire week!


Start Your Free Trial
Loading...