OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: alimag on 13 Oct 2009, 02:34:45
-
Hi,
Is there a way to simulate key presses by script?
You know like a macro or sendKey function (that I did not found).
Something in a script like:
sendKey {32, 45};
or
[32, 45] execVM "sendKey.sqf";
would simulate pressing the corresponding keys...
Thanks in advance
Cheers
-
Do you mean to trigger ArmA default behaviour for that key? If so, no that I know, and also consider that many users have all the keys redefined.
-
Hi Mandoble,
Thanks for answering.
It's exactly what I had in mind.
In fact I was thinking about making something more visual like a menu or dialog for players that have problems with the default squad management system. But I did'nt want to script all the corresponding behaviours.
For example, I've found that the command Return to formation is connected to a constant CMD_JOIN that corresponds to the value 9. But that's where the trail ends. I suspect that those commands are hardcoded somewhere in the executable so short of reverse enginering there is no way to access them.
So I had to think of some other way. But as you say, if the keyboard is remapped...I did not think of that one.
I'm not sure it's worthed to rescript everything...
Thanks anyway. I appreciate that you took the time to answer.
Cheers