Posted By: WileECoyote
Doing something based on current mode - 11/06/11 01:39 AM
Hello gentlemen.
I'm trying to do something pretty easy... but I don't seem to be able to.
What I want is combine the mode switch (button 3) with a keypress, so I can send a keystroke to the sim and at the same time switch to another mode on the stick.
So, for example:
I´m in mode 1 (NAV), and then press button3, to go to my AG mode, then stick not only switches to mode 2, but also sends Shift-6 to my sim. Obviously, to be able to know what key to send, I first need to know what mode I'm in. I would think that I can query the CURRENTMODE variable, something like this:
But I'm getting the error: "Bit value expected but CURRENTMODE found"...
Any idea about how to accomplish this?
Thanks.
I'm trying to do something pretty easy... but I don't seem to be able to.
What I want is combine the mode switch (button 3) with a keypress, so I can send a keystroke to the sim and at the same time switch to another mode on the stick.
So, for example:
I´m in mode 1 (NAV), and then press button3, to go to my AG mode, then stick not only switches to mode 2, but also sends Shift-6 to my sim. Obviously, to be able to know what key to send, I first need to know what mode I'm in. I would think that I can query the CURRENTMODE variable, something like this:
Code:
if (JS1.b3) then if (CURRENTMODE == MODE1) then SendKey('Shift-6') <--- No idea how to do that. CURRENTMODE= MODE2 else if (CURRENTMODE == MODE2) then...
But I'm getting the error: "Bit value expected but CURRENTMODE found"...
Any idea about how to accomplish this?
Thanks.