Author Topic: Using VA/AHK to switch profile in Razer Synapse?  (Read 6683 times)

Fascion

  • Guest
Using VA/AHK to switch profile in Razer Synapse?
« on: April 14, 2017, 08:48:07 AM »
Howdy all.  I've been using VoiceAttack for quite some time now, though by and large, on a very basic level.  Lately I've wanted to see what kind of trouble I can get myself into by diving head first into some of the more advanced stuff, and to start this venture off right, I want to look into something that... may not even be possible?

To that end, one thing I've always wished I could be doing with VA is, as the title suggests, using it to switch profiles in Razer Synapse.  After a bit of Googling, I haven't found any obvious way to go about it, let alone a direction to even start on.  I was thinking it could possibly be done via target commands in different shortcuts for Synapse... but no dice finding anything on possible commands there.  Next I got to thinking AHK might be the ticket, but I'm pretty basic in my knowledge of that as well right now.

Any thoughts on something like this?  Perhaps I'm better off figuring out the AHK side of things first, then just plugging that into VA?

Thanks for any insights...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Using VA/AHK to switch profile in Razer Synapse?
« Reply #1 on: April 14, 2017, 04:28:10 PM »
From what I can find, Razer doesn't offer a macro-related API, and Synapse doesn't appear to have command line arguments for changing profiles.

I'd say you have two options(provided you can't find a method to set profiles programmatically):
Have VoiceAttack open the Razer Synapse software, and use mouse and/or keyboard actions to switch profiles; This will require tabbing out of the game, and waiting for the window to pop up, not ideal at all.


Alternatively, you could make use of the application-linked automatic profile switching normally used to switch to a profile when a game starts, for example, by having VoiceAttack start and stop dummy executables(which would just sit idle in the background) linked to profiles, to make Synapse auto-switch to different profiles at will.

E.G. you have "dummy1.exe" linked to "Profile1", so you speak "switch to profile one", whereupon VoiceAttack starts "dummy1.exe", and Synapse switches to "Profile1". Then, you speak "switch to profile two"; VoiceAttack stops "dummy1.exe" and starts "dummy2.exe", making Synapse switch to "Profile2", etc..

Fascion

  • Guest
Re: Using VA/AHK to switch profile in Razer Synapse?
« Reply #2 on: April 14, 2017, 05:14:41 PM »
That's some clever thinking!  Unfortunately, I'm not sure how well it might work in practice.  Part of the problem, and why I was hoping to accomplish this through VA in the first place, is how slowly Synapse processed the profile switching.  I was needing something far more immediate.  Timeliness aside, there is also the issue of how Synapse handles profile switching with linked programs -- it checks the active window rather than open processes, and swaps back to the default when you get off that window.

So, it would appear that Synapse is the weak link here.  Maybe I can sidestep it a bit?  After I had made this post, I got to thinking that another potential work-around would be to start using a single profile in Synapse, and start using AHK to remap the buttons on both my Orbweaver and Naga when I need something off-standard.

The only thing that bugs me about this method is... if I'm not mistaken, anyway... Razer doesn't offer special keybinds specific to their products, right?  I seem to recall that being a thing with Logitech, but I guess I haven't owned any of their stuff in well more than a decade now.  If not, I guess I am stuck making these keybinds something silly like ALT+SHIFT+F1-F10, ALT+CTRL+F1-F10, SHIFT+CTRL+... and so on.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Using VA/AHK to switch profile in Razer Synapse?
« Reply #3 on: April 14, 2017, 06:16:28 PM »
it checks the active window rather than open processes
Ah, of course. Thinking about it now, that's probably what most macro software does, sorry for the dead end.

Razer doesn't offer special keybinds specific to their products, right?  I seem to recall that being a thing with Logitech
If you mean the "G" keys having their own keybinds, I can confirm they do not(on the blue G15 at least). Without the drivers, "G1" through "G12" map to "F1" through "F12", and "G13" through "G18" map to the numeric row as "1" through "8".
Hardware manufacturers can't just add keyboard keys that don't exist as a standard anyway, as far as I'm aware.

If the software allows it, you could bind F13 through F24; That's twelve keys not present on most physical keyboards, which VoiceAttack should be able to receive.

Fascion

  • Guest
Re: Using VA/AHK to switch profile in Razer Synapse?
« Reply #4 on: April 14, 2017, 06:35:00 PM »
If the software allows it, you could bind F13 through F24; That's twelve keys not present on most physical keyboards, which VoiceAttack should be able to receive.
Tested and confirmed.  Though Synapse shows the keybind as being blank, it appears to function as expected. 

I do believe I can make this work.  Thanks for the assist!