Running NOOBSCMDR's .vbs files with LuaMacros

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
Posts: 3
Joined: 23 Jun 2021, 16:49

Running NOOBSCMDR's .vbs files with LuaMacros

Post by cheddargt » 08 Jul 2021, 12:50

A very cool dude made a video teaching how to use LuaMacros with a simple script that turns key inputs into OBS multiple key inputs for changing scenes, etc. Here it is: You need to watch this first.

I, also a cool dude, made an adaptation to his script in order for it to run .vbs files, which NOOBSCMDR exports (a tool made yet by ANOTHER cool dude). Here's both of his videos: and

Here's the script:

IMPORTANT: you have to change the 2C202B8E part with your specific numeric keyboard's unique ID. He explains how to find it in the video.

Also, change the .vbs files location/names according to yours and button numbers according to your keyboard's. He explains it better in his video.

Code: Select all

-- Lua script by Asq Gaming
-- Youtube:
-- Twitter:
-- Twitch:

-- Additional notes by cheddargt:
-- The function lmc_spawn() receives two variables. The first is a program and the second is a file that opens with that program.
-- i.e. opening an image with paint.exe would look like this:
-- lmc_spawn('C:\\Windows\\System32\\mspaint.exe', 'C:\\Users\\Gustavo\\Desktop\\image.png') 
-- Avoid accentuation in your path (like having your user be 'C:\Users\João' or a file called 'CenaGenérica.vbs' ). Lua doesn't like that. Doesn't work.
-- The double minus signs (--) before some lines means it's a commentary. It's not read by the compiler (if it's code, it's like it isn't there).
-- Use this to make notes for yourself and remove/add conditions when you're not using some of your keys (but want to keep it there).


lmc_set_handler('streamdeck', function(button,direction)
  if (direction == 1) then return end

  -- Numpad /
  if (button == 111) then

    -- Numpad *
    elseif (button == 106) then

    -- Numpad -
    --elseif (button == 109) then

    -- Numpad 7
    elseif (button == 103) then

    -- Numpad 8
    elseif (button == 104) then

    -- Numpad 9
    elseif (button == 105) then

    -- Numpad +
    elseif (button == 107) then

    -- Numpad 4
    elseif (button == 100) then

    -- Numpad 5
    elseif (button == 101) then

    -- Numpad 6
    --elseif (button == 102) then

    -- Numpad BKSP
    --elseif (button == 8) then

    -- Numpad 1
    elseif (button == 97) then

    -- Numpad 2
    elseif (button == 98) then

    -- Numpad 3
    elseif (button == 99) then

    -- Numpad ENTER
    elseif (button == 13) then

    -- Numpad 0
    elseif (button == 96) then

    -- Numpad .
    --elseif (button == 190) then

This was super useful to me because as a portuguese speaker, accentuation is a key part of communication and HID Macros kind of glitches them out and they come out like this: ´´ ~~ ``

Pretty useful to be able to use this without having that drawback :)

Post Reply