Author Topic: Generate button presses  (Read 7484 times)

terrydew

  • Jr. Member
  • **
  • Posts: 54
Generate button presses
« on: August 29, 2016, 09:36:43 AM »
Would it be possible to have a command action that would act like a given joystick button has been pressed? I use prepar3d flight sim a lot and have a program that allows you to create custom commands utilizing variables in the sim. It is very powerful and its interface is through joystick type devices and other custom hardware. I would like to be able to have VA call these custom commands that are mapped to joystick buttons via the other program.

The simple way to do this would be to issue a software command that would represent a button push which then make the other program think the button had been pushed and issue the custom event to the sim.

I guess another way would be to write a VA plugin but after reading the help section on plugins (and yes my eyes did glaze over :)) I couldn't tell if that could work?

If you read this, thank you. If you can understand my poor job of explaining a double thank you.

Terry


EDIT by Pfeil: A virtual joystick using the vJoy driver can already be controlled using the VoiceAttack plugin linked by Gary; Pressing buttons on an existing joystick is not supported by DirectX (not a VoiceAttack limitation)
« Last Edit: April 18, 2020, 07:16:47 AM by Pfeil »

terrydew

  • Jr. Member
  • **
  • Posts: 54
Re: Generate button presses
« Reply #1 on: September 02, 2016, 11:59:47 AM »
Don't know or not interested?

Terry

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Generate button presses
« Reply #2 on: September 03, 2016, 12:11:13 AM »
Too busy over the last week+ to answer.

You might want to look at the vJoy plugin over on the old forum:  https://groups.google.com/forum/#!topic/voiceattack/eOkWVHK8yy8

Some have trouble with using the latest version of vJoy, so it may or may not work for you.  It's white-boarded to be updated soon.

terrydew

  • Jr. Member
  • **
  • Posts: 54
Re: Generate button presses
« Reply #3 on: September 03, 2016, 12:14:11 PM »

Thank you for responding.

That is very close to what I need except that I need to use physical not virtual sticks. Do you think it is possible to do the same think with physical joysticks? I am hoping that a generated button push would be picked up by my sim control software?

Terry

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Generate button presses
« Reply #4 on: September 03, 2016, 06:10:34 PM »
There's no way for VA to interact with your joystick unless it would talk to its driver somehow.  I don't have that level of expertise, unfortunately.  Is there any way to add the virtual stick to your application?  It should show up as an actual joystick.

terrydew

  • Jr. Member
  • **
  • Posts: 54
Re: Generate button presses
« Reply #5 on: September 05, 2016, 01:25:38 PM »
There's no way for VA to interact with your joystick unless it would talk to its driver somehow.  I don't have that level of expertise, unfortunately.  Is there any way to add the virtual stick to your application?  It should show up as an actual joystick.

Hi Gary

That was a great idea and I had everything setup to test but VA gave me the error "Version of Driver (216) does Not match DLL Version (205)? I guess that is part of the update you mentioned earlier. Is there any time frame of when that update might be?

If this works it would make VA much more useful for FSX and P3D as almost all of the good third party aircraft use their own set of local variables rather than standard key mapping.

Thanks
Terry

Cananas

  • Guest
Re: Generate button presses
« Reply #6 on: September 07, 2016, 09:31:06 AM »
There's no way for VA to interact with your joystick unless it would talk to its driver somehow.  I don't have that level of expertise, unfortunately.  Is there any way to add the virtual stick to your application?  It should show up as an actual joystick.

As the point here is not simulate a joystick, I was asking me if there is no posibility to talk to DirectInput to send a known-joy button press. Actually VA is able to read from joysticks, isn't it? Would it be posible to send Windows a known-joy button press as if I would be pressing the real button of the joystick?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Generate button presses
« Reply #7 on: September 22, 2016, 09:18:57 AM »