All Projects → BarRaider → Streamdeck Supermacro

BarRaider / Streamdeck Supermacro

Create sophisticated macros easily and run them through your Stream Deck

SuperMacro - Advanced keystroke macros triggered by the Elgato Stream Deck

Author's website and contact information: https://barraider.com

New in v2.0

  • New Capture keystroke feature allows to record the Key Strokes instead of manually typing them into the textbox.
  • New {{SetClipboard}} command will set the value of a string or variable into the clipboard
  • New Functions:
    • LEN - Returns the length of the string/variable
    • MID - Returns a substring from the current string/variable
    • INDEXOF - Returns the first 0-based position of a text in the string. Example: FUNC:INDEXOF:RES:Hello:e will return 1 into RES
    • REVERSE - Reverses the string/variable

New in v1.9

  • Added variable support for VARSETFROMFILE and OUTPUTTOFILE
  • MouseXY and MouseMove commands now support both a comma and a colon between the X and Y values (for better consistency with other commands) {{MOUSEXY:$VarX:$VarY}}
  • Length of the long-press in SuperMacro action is now customizable
  • Keystroke PTT now has a Run Once option, to only run the command a single time
  • You can now control the output frequency of the Keystroke PTT using the delay slider
  • {{MSCROLLUP}} and {{MSCROLLDOWN}} now support an optional number of clicks to scroll. (See example 13 below)
  • {{MOUSEXY}} now supports variables for moving the mouse (see example 14 below)
  • {{MSAVEPOS}} now stores the values in variables $MOUSE_X and $MOUSE_Y
  • New REPLACE function allows replacing parts of a variable/string (see usage in Functions section and example 15 below)
  • New NOW function allows to get the current date and time and format it (see example 16 below)
  • Added link to documentation inside the settings
  • Fixed issue with Output command messing up text

New in v1.8

  • 🆕 FUNCTIONS Support!
    • RANDOM function allows choosing a random number in a customized range
    • ADD/SUB/MUL/DIV allow to Add, Subtract, Multiply and Divide numbers
    • CONCAT function allows to concatenate multiple strings/variables into one
  • Comments support: Type {{//}} and everything after it will be ignored, until the end of the line.
  • New {{SetKeyTitle}} command to dynamically change the title of the Stream Deck button. See {{SETKEYTITLE}} command below.
  • New {{OutputToFile}} command to store contents of a variable to file. See {{OUTPUTTOFILE}} command below.
  • New {{VarSetFromClipboard}} command to set a variable with the clipboard contents. See {{VARSETFROMCLIPBOARD}} command below.
  • New Mouse Location action shows you the current mouse coordinates, to be used with the MouseXY command.
  • SuperMacro Toggle can now be set to remember the toggle state even when switching profiles or restarting the Stream Deck :pogchamp:
  • SuperMacro PTT action now supports sending a specific keystroke when key is released
  • SuperMacro PTT and StickyKeypress action now support a customizable delay (pause) between every execution.
  • {{INPUT}} Command now remembers the previous value and autofills it in the popup window

New in v1.7

  • 🆕 Loops Support!
    • Sticky SuperMacro and Sticky Keystroke both support loops! Use the Auto Stop After N Rounds to create loops which will run a customizable amount of times.
  • New Variable Commands!
    • {{VarSet}} - Use {{VARSET:VarName:Value}} to set the value Value into VarName. You can then use {{OUTPUT:VarName}} to display it
    • {{VarSetFromFile}} - Use {{VARSETFROMFILE:VarName:c:\myfile.txt}} to read myfile.txt and store its contents into VarName. You can then use {{OUTPUT:VarName}} to display it
    • {{VarUnset}} - Use {{VARUNSET:VarName}} to clear VarName
    • {{VarUnsetAll}} - Clears all variables. Usage: {{VARUNSETALL}}
  • Full support for Numpad buttons! Added a bunch of new commands to differentiate between Numpad buttons and their non-Numpad variation (Arrows, Home, End, ...). See full list below
  • Storing/Restore mouse position. Use {{MSAVEPOS}} to store the current mouse position. Later use {{MLOADPOS}} to move the mouse back to that position
  • Mouse Double-Clicks:
    • Left Double Click now uses the {{MLEFTDBLCLICK}} command.
    • Right Double Click now uses the {{MRIGHTDBLCLICK}} command.
  • MouseXY command which is superseding the MousePos command. Use it to move the mouse cursor to a specific place on your desktop. Use together with the new Mouse Location action to quickly determine the coordinates you want.
  • Support for mouse Button 4 and Button 5 - Use {{XBUTTON1}} for Button 4 click. Use {{XBUTTON2}} for Button 5 click.
  • New Let macro complete on stop option available for Sticky SuperMacro. Will ensure the macro completes fully when the button is pressed

Current functionality

5 Plugins built into one:

Super Macro

This is the basic implementation. Create a macro and run it on keypress. Examples can be seen in the Usage Examples section below.

Super Macro Toggle

Toggle between two different macros.

Sticky Super Macro

Click once to enable, the macro will run again and again until the button is pressed again

Keystroke PTT

This action limits the action to either one command (such as {{ctrl}{c}}) or one character. The command will be run again and again as long as you continue to press the key.

Sticky Keystroke

This action limits the action to either one command (such as {{ctrl}{c}}) or one character. The command will be run again and again until the button is pressed again.

How do I get started using it?

SuperMacro knows to deal with both Commands and normal text. A command is either one special key (like F5 or Winkey) or a keystroke (like Ctrl-C). A command is always enclosed in {} and each individual key in the command is also inclosed in {} so you should always see two {{ at the beginning and two }} at the end. For instance: {{f5}} or {{ctrl}{c}}

Usage Examples

  1. Open Windows Explorer and got to C:\Program Files
    Note: Delay should be ~20 ms
{{win}{e}}{{pause:400}}{{alt}{d}}c:\Program Files\{{enter}}
  1. Open notepad and play with the settings
    Note: Delay should be ~20 ms
    Note2: This will not work correctly if your Windows (and notepad) are not in English
{{win}{r}}{{pause:500}}notepad.exe{{enter}}{{pause:1000}}Ok... Let's see what this plugin can do...{{alt}{f}}{{right}}{{PAUSE:400}}{{right}}{{PAUSE:400}}f{{pause:400}}times{{down}}{{PAUSE:400}}{{tab}}{{PAUSE:400}}{{down}}{{PAUSE:400}}{{down}}{{PAUSE:400}}{{ENTER}}{{ENTER}}For more information visit: https://barider.g1thubio{{ctrl}{shift}{left}}{{PAUSE:400}}https://barraider.github.io{{ENTER}}{{alt}{o}}f{{PAUSE:100}}Lucida Console{{tab}}Regular{{Tab}}12{{ENTER}}
  1. Calculate something
    Note: Delay should be ~20 ms
{{win}{r}}{{pause:300}}calc{{enter}}{{pause:1000}}1*2*3*4*5=
  1. Move the mouse to a certain position on the screen, then press Double-Click left mouse button.
    Note: To find the correct position you can use the Mouse Location action.
{{MOUSEXY:1000,15}}{{MLEFTDBLCLICK}}
  1. Move the mouse by 10 pixels left and 20 pixels down on every press
{{MOUSEMOVE:-10,20}}
  1. Variables: Get input from user and then use it later on.
{{INPUT:Name}}Hello {{OUTPUT:Name}}, Nice to meet you!
  1. Variables: Read text from file into MyVar variable
{{VarSetFromFile:MyVar:C:\filename.txt}}
  1. Functions: Choose a random number between 1 (inclusive) to 10 (exclusive) and store it in MyVar:
{{FUNC:RANDOM:MyVar:1:10}}
  1. Functions: Input 2 numbers from the user. Choose a random number between firstNum variable (inclusive) to secondNum variable (exclusive) and store it in MyVar:
{{INPUT:firstNum}}
{{INPUT:secondNum}}
{{FUNC:RANDOM:MyVar:$firstNum:$secondNum}}
  1. Functions: Select a number from the user and multiply it by 10. Then save it to a file named c:\temp\result.txt:
{{INPUT:myNumber}}
{{FUNC:MUL:MyResult:$myNumber:10}}
{{OUTPUTTOFILE:MyResult:c:\temp\result.txt}}
  1. Add comments in the code using {{//}} command
{{INPUT:myNumber}} {{//}} Input a number from the user
{{FUNC:MUL:MyResult:$myNumber:10}} {{//}} Multiply number by 10
{{OUTPUTTOFILE:MyResult:c:\temp\result.txt}} {{//}} Save result in file
  1. Read text from a file and show it on the Stream Deck Key:
{{VARSETFROMFILE:MyVar:c:\counter.txt}}
{{SETKEYTITLE:$MyVar}}
  1. Read text from a clipboard and show it on the Stream Deck Key:
{{VARSETFROMCLIPBOARD:MyVar}}
{{SETKEYTITLE:$MyVar}}
  1. Scroll the mouse up by 5 clicks and then down by 3 clicks:
{{MSCROLLUP:5}}
{{MSCROLLDOWN:3}}
  1. Move the mouse to coordinates set from variables:
{{VARSET:X:100}}
{{VARSET:Y:400}}
{{MOUSEXY:$X,$Y}}
  1. Repalce all "l"'s with "Z"'s in the string Hello World and show it on key
{{VARSET:XX:Hello World}}
{{VARSET:A:l}}
{{VARSET:B:Z}}
{{FUNC:REPLACE:MyVar:$XX:$A:$B}}
{{SETKEYTITLE:$MyVar}}
  1. Show the current date and time on the key:
{{FUNC:NOW:MyVar:yyyy-MM-dd 
HH:mm:ss}}
{{SETKEYTITLE:$MyVar}}
  1. Set value of variable into the clipboard
{{VARSET:MyVar:Hello World}}
{{SETCLIPBOARD:$MyVar}}

*** More commands below ***

Download

I found a bug, who do I contact?

For support please contact the developer. Contact information is available at https://barraider.com

I have a feature request, who do I contact?

Please contact the developer. Contact information is available at https://barraider.com

Dependencies

  • Uses StreamDeck-Tools by BarRaider: NuGet
  • Uses Easy-PI by BarRaider - Provides seamless integration with the Stream Deck PI (Property Inspector)

List of supported keystroke commands

Keyboard Key Macro Command
Letters A-Z {VK_XXXX} (XXXX = the letter - e.g. VK_A / VK_B ...)
Numbers 0-9 {VK_XXXX} (XXXX = the number - e.g. VK_0 / VK_1 ...)
These characters:
;/`[\]':?~{|}"
Exact command changes between keyboard layouts:
Try the following macros to figure out the correct command:
{{oem_1}}{{oem_2}}{{oem_3}}{{oem_4}}{{oem_5}} {{oem_6}}{{oem_7}}{{oem_8}} {{shift}{oem_1}}{{shift}{oem_2}}{{shift}{oem_3}} {{shift}{oem_4}}{{shift}{oem_5}} {{shift}{oem_6}}{{shift}{oem_7}}{{shift}{oem_8}}
Numpad 0 {NUMPAD0}
Numpad 1 {NUMPAD1}
Numpad 2 {NUMPAD2}
Numpad 3 {NUMPAD3}
Numpad 4 {NUMPAD4}
Numpad 5 {NUMPAD5}
Numpad 6 {NUMPAD6}
Numpad 7 {NUMPAD7}
Numpad 8 {NUMPAD8}
Numpad 9 {NUMPAD9}
Numpad * {MULTIPLY}
Numpad + {ADD}
Numpad - {SUBTRACT}
Numpad . {DECIMAL}
Numpad / {DIVIDE}
BACKSPACE {BACK}
TAB {TAB}
CLEAR {CLEAR}
ENTER {RETURN} or {ENTER}
SHIFT {SHIFT}
Left SHIFT {LSHIFT}
Right SHIFT {RSHIFT}
CTRL {CONTROL} or {CTRL}
Left CONTROL {LCONTROL} or {LCTRL}
Right CONTROL {RCONTROL} or {RCTRL}
ALT {ALT} or {MENU}
Left ALT {LALT} or {LMENU}
Right ALT {RALT} or {RMENU}
PAUSE/BREAK {BREAK}
CAPS LOCK {CAPITAL}
ESC {ESCAPE}
SPACEBAR {SPACE}
PAGE UP {PAGEUP} or {PGUP} or {PRIOR}
Numpad PAGE UP {NUMPAD_PAGEUP}
PAGE DOWN {PAGEDOWN} or {PGDN} or {NEXT}
Numpad PAGE DOWN {NUMPAD_PAGEDOWN}
HOME {HOME}
Numpad HOME {NUMPAD_HOME}
END {END}
Numpad END {NUMPAD_END}
UP ARROW {UP}
Numpad UP ARROW {NUMPAD_UP}
LEFT ARROW {LEFT}
Numpad LEFT ARROW {NUMPAD_LEFT}
RIGHT ARROW {RIGHT}
Numpad RIGHT ARROW {NUMPAD_RIGHT}
DOWN ARROW {DOWN}
Numpad DOWN ARROW {NUMPAD_DOWN}
SELECT {SELECT}
PRINT SCREEN {SNAPSHOT}
PRINT {PRINT}
EXECUTE {EXECUTE}
INS {INSERT}
Numpad INS {NUMPAD_INSERT}
DEL {DELETE}
Numpad DEL {NUMPAD_DEL}
HELP {HELP}
Left Windows {LWIN} or {WIN} or {WINDOWS}
Right Windows {RWIN}
F1 {F1}
F2 {F2}
F3 {F3}
F4 {F4}
F5 {F5}
F6 {F6}
F7 {F7}
F8 {F8}
F9 {F9}
F10 {F10}
F11 {F11}
F12 {F12}
F13 {F13}
F14 {F14}
F15 {F15}
F16 {F16}
F17 {F17}
F18 {F18}
F19 {F19}
F20 {F20}
F21 {F21}
F22 {F22}
F23 {F23}
F24 {F24}
Plus: += {OEM_PLUS} / {{SHIFT}{OEM_PLUS}}
Minus: -_ {OEM_MINUS} / {{SHIFT}{OEM_MINUS}}
Period: .> {OEM_PERIOD} / {{SHIFT}{OEM_PERIOD}}
Comma: ,< {OEM_COMMA} / {{SHIFT}{OEM_COMMA}}
NUM LOCK {NUMLOCK}
SCROLL LOCK {SCROLL}

Advanced Commands

Note: Use a : between the command name and the arguments

{{//}} Comments Support: Anything after the {{//}} sign will be ignored until end of line.
PAUSE {{PAUSE:XXXX}} (XXXX = length in miliseconds)
KeyDown {{KeyDown:XXXX}} (XXXX = name of key, example {{KeyDown:F1}})
KeyUp {{KeyUp:XXXX}} (XXXX = name of key, example {{KeyUp:SHIFT}})
Input {{Input:VarName}} Get input from the user and store it in 'VarName'.
Output {{Output:MyVar}} Output the input previously gathered into 'MyVar'.
VarSet {{VarSet:MyVar:MyValue}} set the value `MyValue` into `MyVar`.
OutputToFile {{OutputToFile:MyVar:C:\filename.txt}} write the contents of the `MyVar` variable into `c:\filename.txt` file.
VarSetFromFile {{VarSetFromFile:MyVar:C:\filename.txt}} read the contents of the file specified and store into `MyVar`.
VarSetFromClipboard {{VarSetFromClipboard:MyVar}} read the contents of the clipboard and store into `MyVar`.
VarUnset {{VarUnset:MyVar}} clears `MyVar`.
VarUnsetAll {{VARUNSETALL}} clears all variables.
MSavePos {{MSAVEPOS}} stores the current mouse cursor position.
The position is stored in variables: $MOUSE_X and $MOUSE_Y
MLoadPos {{MLOADPOS}} moves the mouse to the previous set position (when `{MSAVEPOS}` was called).
SetKeyTitle {{SetKeyTitle:$MyVar}} Sets the text on the Stream Deck key to the contents of `MyVar`.
SetClipboard {{SetClipboard:$MyVar}} Sets the clipboard to the contents of `MyVar`.

Functions

Syntax:

{{FUNC:NameOfFunction:OutputVariable:InputParam1:InputParam2:InputParam3...}}

Where 'InputParamX' can either be text (10) or another variable ($MyVar)
Function Name Number of Input variables Example Comments
ADD 2 {{FUNC:ADD:MyVar:10:20}} (10+20 and store in MyVar)
{{FUNC:ADD:Var1:10:$Var2}} (Add 10 to Var2 and store in Var1)
{{FUNC:ADD:Result:$Var1:$Var2}} (Sum Var1 and Var2 and store in Result)
SUB 2 {{FUNC:ADD:MyVar:20:10}} (20-10 and store in MyVar) (Additional examples similar to ADD above)
MUL 2 {{FUNC:MUL:MyVar:10:20}} (10*20 and store in MyVar) (Additional examples similar to ADD above)
DIV 2 {{FUNC:DIV:MyVar:​100:50}} (100/50 and store in MyVar). (Additional examples similar to ADD above)
RANDOM 2 {{FUNC:RANDOM:MyVar:1:20}} (Find a random number between 1 (inclusive) and 20 (exclusive) and store in MyVar.
{{FUNC:RANDOM:MyVar:$FirstVal:$SecondVal}} (Find a random number between FirstVal variable (inclusive) and SecondVal variable (exclusive) and store in MyVar.
Note: First value must be LOWER than Second value.
CONCAT Unlimited {{FUNC:CONCAT:MyVar:Hello:World:$Var1:Hi:$Var2}}
MyVar will have the string: HelloWorldXXXXHiYYYY Where XXXX is the contents of Var1 and YYYY is the contents of Var2
REPLACE 3 {{FUNC:REPLACE:MyVar:Hello:He:Y}}
MyVar will have the string: Yello

{{VARSET:XX:Hello World}} {{VARSET:A:l}}{{VARSET:B:Z}} {{FUNC:REPLACE:MyVar:$XX:$A:$B}}
MyVar will have the string: HeZZo WorZd
NOW 1 {{FUNC:NOW:MyVar:yyyy-MM-dd HH:mm:ss}}
MyVar will have the current date and time.
LEN 1 {{FUNC:LEN:MyVar:Hello World}} (Length of the string 'Hello World')
MyVar will have the value 11
MID (Arguments: 1. 0-Based Start Position 2. [Optional] Length) {{FUNC:MID:RES:Hello:2}} RES will have llo
{{FUNC:MID:RES:Hello:0:2}} RES will have He
REVERSE 1 {{FUNC:REVERSE:MyVar:Hello World}}
MyVar will have the value: dlroW olleH
INDEXOF 2 Returns the first 0-based position of a text in the string.
{{FUNC:INDEXOF:RES:Hello:e}} will return 1 into RES (since e has an index of 1 in the string)

Mouse Commands

Mouse Key Macro Command
Mouse Left-Click {{LBUTTON}}
Mouse Left Double-Click {{MLEFTDBLCLICK}}
Mouse Left Button Down {{MLEFTDOWN}}
Mouse Left Button Up {{MLEFTUP}}
Mouse Right-Click {{RBUTTON}}
Mouse Right Double-Click {{MRIGHTDBLCLICK}}
Mouse Right Button Down {{MRIGHTDOWN}}
Mouse Right Button Up {{MRIGHTUP}}
Mouse Middle Click {{MBUTTON}}
Mouse Middle Button Down {{MMIDDLEDOWN}}
Mouse Middle Button Up {{MMIDDLEUP}}
Mouse Button 4 Click {{XBUTTON1}}
Mouse Button 5 Click {{XBUTTON2}}
Mouse Scroll Wheel Up {{MSCROLLUP}}
Optional: Set the number of 'clicks' to scroll up: {{MSCROLLUP:10}} will scroll up 10 clicks
Mouse Scroll Wheel Down {{MSCROLLDOWN}}
Optional: Set the number of 'clicks' to scroll down: {{MSCROLLDOWN:3}} will scroll down 3 clicks
Mouse Horizontal Scroll Left {{MSCROLLLEFT}}
Optional: Set the number of 'clicks' to scroll left: {{MSCROLLLEFT:3}} will scroll left 3 clicks
Mouse Horizontal Scroll Right {{MSCROLLRIGHT}}
Optional: Set the number of 'clicks' to scroll right: {{MSCROLLRIGHT:3}} will scroll right 3 clicks
Mouse Move based on CURRENT position {{MOUSEMOVE:X,Y}} (Move the cursor by X,Y from current position)
Mouse Move based on multi-screen resolutions {{MOUSEXY:X,Y}} (Move the cursor to the X,Y position on the screen. 0,0 is the [top-left] of your primary monitor. Supports both positive and negative values. Use along with the `Mouse Location` action to easily find the right coordinates on your PC
Supports variables too: {{MOUSEXY:$Var1,$Var2}}
(DEPRICATED) Mouse Move based on ABSOLUTE position (DEPRICATED) {{MOUSEPOS:X,Y}} (Move the cursor to the X,Y position on the screen. Values from 0,0 [top-left] to 65535,65535 [bottom-right])
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].