Hiob Posted December 21, 2023 Posted December 21, 2023 (edited) Would it be possible to set a trigger in a mission, which will call a button press like "rctrl+home"? For reference: I have no idea how to create missions beyond dropping units on the map and setting weather. So be kind to me please.... Edited December 21, 2023 by Hiob "Muß ich denn jedes Mal, wenn ich sauge oder saugblase den Schlauchstecker in die Schlauchnut schieben?"
cfrag Posted December 21, 2023 Posted December 21, 2023 Not with scripting (AFAIK), but you can emulate a press of a control with the Mission-Editor provided ACTIONS "X: SET COMMAND". It requires that you do the required voodoo dance (get the command number and required values) and then you can make it look as if the player pressed the referenced button. That is how ED (and others) write tutorials that press buttons for you. The bad news is that the buttons numbers are often plane-individual, and this works only in single-player. But if you want to play with this, here's an action that should put your mission on active pause: X SET COMMAND: 816 I know that it works in the A-10A. Other planes, your guess. As a whole I found this method of figuring out and then simulating user input wholly unpleasant and not something that I enjoy.
Hiob Posted December 21, 2023 Author Posted December 21, 2023 6 minutes ago, cfrag said: Not with scripting (AFAIK), but you can emulate a press of a control with the Mission-Editor provided ACTIONS "X: SET COMMAND". It requires that you do the required voodoo dance (get the command number and required values) and then you can make it look as if the player pressed the referenced button. That is how ED (and others) write tutorials that press buttons for you. The bad news is that the buttons numbers are often plane-individual, and this works only in single-player. But if you want to play with this, here's an action that should put your mission on active pause: X SET COMMAND: 816 I know that it works in the A-10A. Other planes, your guess. As a whole I found this method of figuring out and then simulating user input wholly unpleasant and not something that I enjoy. Thank you. Unfortunately that's not what I had in mind. I wanted to initiate a "button press" to be registered by a different application (afterburner in this case). "Muß ich denn jedes Mal, wenn ich sauge oder saugblase den Schlauchstecker in die Schlauchnut schieben?"
cfrag Posted December 21, 2023 Posted December 21, 2023 7 minutes ago, Hiob said: I wanted to initiate a "button press" to be registered by a different application Uh, I know that that is possible in theory, because that is how many sim pits work. That being said, it's probably not mission code but server code, or client export. Way outside my bailiwick, I'm afraid.
Hiob Posted December 21, 2023 Author Posted December 21, 2023 3 minutes ago, cfrag said: Uh, I know that that is possible in theory, because that is how many sim pits work. That being said, it's probably not mission code but server code, or client export. Way outside my bailiwick, I'm afraid. I'm afraid it is. Thanks for trying to help anyway! Maybe someone else can hit me with an idea. (Maybe a little mini-script......) "Muß ich denn jedes Mal, wenn ich sauge oder saugblase den Schlauchstecker in die Schlauchnut schieben?"
Hiob Posted December 21, 2023 Author Posted December 21, 2023 5 minutes ago, Insonia said: Wait?? You want DCS to emulate "keystroke" and operate other programs? combined with the hook and export script, it is do-able. However, sending inputs/keystroke to system level is super problematic. huge security risk, ED will not consider this natively. It can only send Avonics parameters in the game. But you can setup a script in ME that prints/sends logs/messages/event that export/hooks read, and then the export script communicates to remote 3rd party software via LuaSocket. programable 3rd party emulators/softwares receive the message and trigger the keystroke/mouse/vitrual joystick/midi whatever you can imagine. I get what you mean, and I agree to a certain extent. However - Isn't that exactly what Voice Command does e.g.? To be precise, I want the button press to be registert by Afterburner/RivaSS - but since I don't think they have an interface for that. "Muß ich denn jedes Mal, wenn ich sauge oder saugblase den Schlauchstecker in die Schlauchnut schieben?"
Recommended Posts