Dismiss Notice
Some Razer services have been impacted due to the unique circumstances COVID-19 has created. We apologize for any inconvenience and appreciate your understanding during this critical time.

Run Macro Programmatically or c++ / c#

Discussion in 'General Discussion' started by fleeasura123, Feb 22, 2020.

Thread Status:
Not open for further replies.
  1. fleeasura123

    fleeasura123 New Member

    Hello, is there a chance to run a recorded macro through program?

    I recorded pressing letter q and assigned it to the keyboard key F1, it is working fine, when I press F1 it will press q.

    I tried to use c++ keybd_event and c# SendKeys.Send to press F1, it is pressing F1 but not pressing q

    Is there a way I can do this?

    Thank you in advance!
    pancholr likes this.
  2. shmekermeister

    shmekermeister Well-Known Member

    If you are running your application outside of the Synapse environment, it's an expected behavior.
    Both C++ and C# simulate keypress on OS level, not on actual keyboard input. I am not quite sure how triggering of macros is happening in Razer environment (does this happen immediately on keyboard, or later in Synapse software), but triggering keypress through custom application comes outside of Synapse, and because of that doesn't trigger any macro defined in it.

    If you want to do this, perhaps there is a way with custom application which is registered through Synapse. I didn't do any application like this myself, but there are some application on the internet (maybe some tutorial, too).
  3. fleeasura123

    fleeasura123 New Member

    Thank you that makes sense, you have a great idea. Maybe I need to try to do a postmessage on synapse itself.

    I been researching how to do it, guess my only options now is to seek help here.

    Thank you so much!
    shmekermeister likes this.
  4. fleeasura123

    fleeasura123 New Member

    Tried to do a PostMessage on RzSynapse.exe it's not the solution. hmmm. any other ideas?
  5. shmekermeister

    shmekermeister Well-Known Member

    Unfortunately, this whole setting is a black box for me :frown_:
    Perhaps someone will show up here who made something similar.
    fleeasura123 likes this.
  6. fleeasura123

    fleeasura123 New Member

    Hopefully there is someone who can do this. Thank you so much!
    shmekermeister likes this.
Thread Status:
Not open for further replies.
Sign In with Razer ID >

Don't have a Razer ID yet?
Get Razer ID >