MacroButtons 1.0.0.7

How to use Voicemeeter Remote API and control Voicemeeter Audio Engine
Vincent Burel
Site Admin
Posts: 417
Joined: Sun Jan 17, 2010 12:01 pm

MacroButtons 1.0.0.7

Postby Vincent Burel » Fri Feb 26, 2016 10:35 am

MacroButton 1.0.0.7 implements new SYSTEM commands to send Keyboard Event or execute application/script

You can download this last version directly there:
http://vbaudio.jcedeveloppement.com/Download_CABLE/VoicemeeterMacroButtons_v1007.zip
(simply extract and copy VoicemeeterMacroButtons.exe in your "C:\ Program Files (x86)\ VB \ Voicemeeter" folder - possibly rename the previous one by "old" to keep it in case of problem).

MacroButtonsToSendKeyboardMessage.jpg
MacroButtonsToSendKeyboardMessage.jpg (116.63 KiB) Viewed 11161 times


System Execute
This function works like a “CreateProcess” or ShellExecute under windows and allow to start any application with a command line argument.

Code: Select all

System.Execute(szprogram, szworkdir, szcommand);


Example to open a web page with the internet explorer:

Code: Select all

System.Execute("C:\Program Files\Internet Explorer\iexplore.exe",
"","-new www.voicemeeter.com");



ENVIRONMENT VARIABLES
It is also possible to use system environment variable by using %envname% syntax.

Example to run the Microsoft WRITE Editor application

Code: Select all

System.Execute("%windir%\write.exe","%TMP%","");



RUNNING DOS APPLICATION
To run command line program, you need to launch cmd.exe with /K command to specify you want to execute the command after…

Example to run ipconfig in a DOS window:

Code: Select all

System.Execute("%windir%\system32\cmd.exe","%windir%\system32","/K ipconfig");

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains


Example to ping your internet router (usual address is 192.168.1.1):

Code: Select all

System.Execute("%windir%\system32\cmd.exe","%windir%\system32","/K ping 192.168.1.1");


System KeyDown / KeyUp / KeyPress
This functions allow to send a combination of 1 to 4 keys by a simple string describing this keyboard combination, like “CTRL+SHIFT + F10” or simply “0”.

System.KeyDown(szKey);
System.KeyUp(szKey);

Example:

Code: Select all

System.KeyDown("A");
System.KeyDown("SHIFT+T");

System.KeyUp("A");
System.KeyUp("SHIFT+T");

System.KeyDown("CTRL+NP1");
System.KeyDown("ALT+F8");

System.KeyUp("CTRL+NP1");
System.KeyUp("ALT+F8");


KeyPress function send Down and UP message in a single function.

Code: Select all

System.KeyPress("CTRL+NP1");
System.KeyPress("ALT+F8");


List of Key Name:
MacroButtonKeysName.gif
MacroButtonKeysName.gif (18.92 KiB) Viewed 11161 times

ComptonEMT
Posts: 3
Joined: Tue Mar 08, 2016 1:29 am

Re: MacroButtons 1.0.0.7

Postby ComptonEMT » Tue Mar 08, 2016 5:26 pm

Hey Vincent,

Is there a way that we could get the ability to bind gaming keyboard keys to this specifically?

I help run a long time friends stream and I want to be able to bind the G buttons on his logitech keyboard without having to go through the hassle of binding those keys (and keeping them bound) to the F13-24 keys.



--==EDIT==--
In fact. It would be interesting to be able to map things to a lot of different peripheral buttons without having to use a key binding on that peripheral. Example being a mouse with the 9 button pad on the thumb side.

Vincent Burel
Site Admin
Posts: 417
Joined: Sun Jan 17, 2010 12:01 pm

Re: MacroButtons 1.0.0.7

Postby Vincent Burel » Wed Mar 09, 2016 9:45 am

Well, I'm afraid i don't understand what you want exctly,
you want to be able to assign the 'G' key to a MacroButton ? with other kind of constraint ?
or you want to generate "G" keyDown Event ? (generating event/command is the main purpose of this thread).
Let me know...

ComptonEMT
Posts: 3
Joined: Tue Mar 08, 2016 1:29 am

Re: MacroButtons 1.0.0.7

Postby ComptonEMT » Wed Mar 09, 2016 6:47 pm

On a logitech gaming keyboard there are extra keys called "G keys" for setting macros and other things of the sort. They function similar to other media keys like play, stop, pause, etc. Usually they're along the left side of the keyboard. The G button keydown event is what I would want to bind in the voicemeeter macro buttons.

What people usually do is modify logitechs files to set these keys to F13-14. However Logitech's own programs have a tendency to revert F13 to F24 to something else. This requires you to go back into the files and rebuild the setup. If there was the ability to bind to the actual keypress in Voicemeeter macro buttons it would take out some middle man functionality that is a pain to deal with. You wouldn't have to bind F13-24 to those keys.

There is always the possibility to program shift + F1-12 for the shortcut but using shift can alter other features in other programs. If a normal keypress can't be bound though I guess this is the best way to do it and I would have to work around that.

Apologies if this doesn't really pertain to the OP. I just commented on the most recent build post to ask the question on this build.

Vincent Burel
Site Admin
Posts: 417
Joined: Sun Jan 17, 2010 12:01 pm

Re: MacroButtons 1.0.0.7

Postby Vincent Burel » Thu Mar 10, 2016 7:52 am

ha, it sounds like a "programmable" key that is maybe not managed by Windows...

could you run this small program to scan the key code of your special "G" Key ?
http://vbaudio.jcedeveloppement.com/Dow ... canKey.exe

Let me know what code is used...

brickviking
Posts: 15
Joined: Sat Jan 30, 2016 11:07 am

Re: MacroButtons 1.0.0.7

Postby brickviking » Fri Mar 11, 2016 2:24 am

I grabbed a useful program yesterday called Audio End Point Controller, from Dan Stevens at GitHub. On my Vista system, that program switches the default Windows audio device. So far in informal testing, I've found that the third parameter of the System.Execute function (for VMButtons) needs a space before any parameter fed to the program. I don't know whether this is normal or not, just that my program wouldn't work from System.Execute without the space. Here's what I ended up with:

Code: Select all

System.Execute("C:\Users\viking\bin\AEPC\Release\EndPointController.exe",""," 2");


I don't know whether the issue lies with EndPointController, or with the MacroButtons, I thought I'd better mention it.

(Post 4)

Vincent Burel
Site Admin
Posts: 417
Joined: Sun Jan 17, 2010 12:01 pm

Re: MacroButtons 1.0.0.7

Postby Vincent Burel » Fri Mar 11, 2016 8:49 am

thanks for the tip, I think the problem is on the system function used behind (Windows.ShellExecute) because i already get the same problem by using directly this function... with personal application... so maybe the problem is pending on the called program ... not interpreting correctly the command line arguments string... will check...

brickviking
Posts: 15
Joined: Sat Jan 30, 2016 11:07 am

Re: MacroButtons 1.0.0.7

Postby brickviking » Mon Mar 14, 2016 3:15 am

I've noticed one other thing in addition to the previous point. Every time I click the button, I get a CMD shell pop up for about 1/10th of a second, then it disappears. I'm assuming this is also intended operation?

(Post 6)

ComptonEMT
Posts: 3
Joined: Tue Mar 08, 2016 1:29 am

Re: MacroButtons 1.0.0.7

Postby ComptonEMT » Fri Mar 18, 2016 9:13 pm

Vincent Burel wrote:ha, it sounds like a "programmable" key that is maybe not managed by Windows...

could you run this small program to scan the key code of your special "G" Key ?
http://vbaudio.jcedeveloppement.com/Dow ... canKey.exe

Let me know what code is used...


Hey man,
Sorry for the delayed response. Been a bit hectic over here with work and such.

I'll download this sometime this week and see what key the G keys come up as.
I almost went and programmed them to the F13-24 but ran out of time before we had to start.

If this functionality could be achieved it would definitely make this the go to audio program for those types of keyboards i think. I will keep you updated

Hannu
Posts: 1
Joined: Fri May 20, 2016 8:24 pm

Re: MacroButtons 1.0.0.7

Postby Hannu » Sun Jun 05, 2016 5:05 pm

Would it be possible to implement "Slider" or "Knob" style/type "buttons"?

In the main program i can midi map knobs to operate the volume sliders as one would assume it to work. The thing is i would love to midi map the eq controls in the same way.

I have managed to program buttons to increase and decrease the eq settings, but its kinda bummer when you have real knobs that could be used to do this.


Return to “Voicemeeter Remote API”

Who is online

Users browsing this forum: No registered users and 1 guest