r/programmingrequests • • Mar 28 '20

Need a button panel window (no idea how)

Looking for a program that will have multiple buttons on it that when i click them they will perform a custom key combination such as 'Ctrl+Alt+R'

check paint skills for example:

so you click in the respective locations to change name of button and to set the key bind it will perform, then press the little lock symbol at the top and the buttons become able to be pressed

that's just an example of the kind of thing I'm after, 4 buttons should be enough but extra is fine

if there's something out there someone knows of that can do this, or someone willing to make something like it, I would be highly appreciative to know of either :-)

2 Upvotes

22 comments sorted by

View all comments

Show parent comment

1

u/BananaLumps Mar 30 '20

Ok, so iv hit a roadblock. I am attempting this in C# as that's the only full language that i know. Turns out to send keyboard commands that will trigger other programs is harder then i thought. I may need to hook the other process in which case ill need to know, Is it just one program you are wanting to send the commands to? If so, what is the programs process name so i can write a hook for it.

1

u/your__dad_ Mar 31 '20

Think about this:

The on-screen keyboard in windows 10, you can click "ctrl" and then "s" and it will do the save operation on any program's window. How is it doing this? If you can figure that out then you can find a way to write this program.

1

u/BananaLumps Mar 31 '20

It's using c++ not c#.

1

u/RaldemeCharer Apr 02 '20

in this case its OBS studio that it was intended for while in VR so that I could quickly hit the menu button on my controller and point at the button and have it save a replay and maybe do other functions too, I was thinking I might find other uses for it too having extra buttons, but if its going to be limited to OBS then im ok with that too :D

1

u/BananaLumps Apr 02 '20

OK, I'll keep checking it out, I have limited knowledge so I'm doing what I can 😁

1

u/RaldemeCharer Apr 05 '20

Thanks a lot! I have next to zero knowledge so it's really appreciated

1

u/BananaLumps Apr 05 '20 edited Apr 05 '20

So this has been rather fun, sorry its taken me a while to do it but i know very little about pInvoke and unmanaged code. Here is my first working exe, im not sure how its going to work on another pc so sorry if it doesn't work at all. You are just going to have to tell me if something doesn't work and ill try fix it, however i am going to keep working on it anyway as its a nice way for me to learn.

Edit: I tested with OBS v25, but the way im hooking OBS it should work with any version

2

u/RaldemeCharer Apr 09 '20

works great thanks!!! like perfectly :D

only thing I would ask if you could perhaps make the boxes 4 times larger? :)

3

u/BananaLumps Apr 09 '20

What do you mean by boxes? The buttons, or the checkboxes? Or just everything?

2

u/RaldemeCharer Apr 09 '20

the buttons please :)

3

u/BananaLumps Apr 11 '20

Hows this?

Iv also added an updater to it, so if i need to make more changes you can get them with the click of a button.

2

u/RaldemeCharer Apr 11 '20

Still seems to be the same size for me :/

→ More replies