Jump to content

Recommended Posts

Posted (edited)

Just got my new sticks and trying to setup a target script to my liking.

 

2 main issues I just cant figure out how to do

 

1) cannot get any of the 5 LED's to switch on / off using script. I can set the backlight, turn them On using the gui..

 

2) I'm trying to setup a multiple command using the Mic switch.

I want to send the command mic forward, then control+Q (to turn on VAC). I've tried the chain command but it groups them as one long press.

Basically I want the mic fwd to execute, then the VAC command, separate but from one keypress. The CHAIN command doesnt seem to do this.

 

lastly, any way to run the script from a shortcut on the desktop rather then having to go into the target program each time?

 

Any help appreciated.

 

thanks

Edited by spikenet
added something
Posted

answered Q2 myself.. after a hour or so I realised I have to include "pulse" on both commands

 

MapKeyIO(&Throttle, MSR,

CHAIN( PULSE+L_ALT+USB[87], D(250), PULSE+L_CTL+'q'),

CHAIN( PULSE+L_CTL+KP0, D(250), PULSE+KP1));

 

 

Still looking for clues with LEDs and startup shortcut

 

cheers

Posted

What exactly did you want to do with the LEDs?

 

I am in the middle of gutting/redoing my office but if you let me know what your goal is I can take a look in an hour or two. I think the info I need is on this computer.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

Hi,

 

I just want to be able to switch them on/off when say I press S4.

 

have been able to get S4 to switch backlights on off but not the LED's.

What I am really trying to do is setup a couple of different Axis profiles and switch the LED's depending on what one is currently loaded.

 

cheers

Posted

To turn all of the LEDs on with the S4 switch you would have to do this:

 

 
MapKey(&Joystick, S4, EXEC("ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT[b][color=red]+[/color][/b]LED1));"
      "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT[color=red][b]+[/b][/color]LED2));"
      "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT[b][color=red]+[/color][/b]LED3));"
      "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT[color=red][b]+[/b][/color]LED4));"
      "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT[b][color=red]+[/color][/b]LED5));"
      ));

 

If you replace the red '+' with a '-' it turns them off and a '^' switches the state.

 

So you just need to chain the set or subset of EXEC statements to the statements that change your curves, switching the lights as needed.

 

You also probably want to set the lights at when you start the profile.

 

For that you just need the five ActKey statements early in the profile to set them all to a known state (off in the example below):

 

 
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5));

 

Let me know if this doesn't get you where you want to go. I have a passable handle on this stuff, I think.;)

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

As for the last question. If there is anyway to do it, something like this:

 

 
c:\target\target.exe -script c:\target\scripts\dcs_A10.tmc -nolog

I have never seen any mention of it.

 

It really does not bother me and, come to think of it, you would need a stop function of some kind as well.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

great, thanks for the help.

 

That LED code doesnt work. I think something must be broken in the engine.

 

I cant find anything about command line options to run scripts etc.. seems very strange to me as this seems such an obvious thing!

 

Also, I cant get the spawn to work ie:

system("spawn -w \"C:\\ProgMain\DCS A-10C\"\"C:\\ProgMain\\DCS A-10C\\Launcher.exe\"");

Nothing happens.

Posted

I can't imagine why the LEDs aren't working for you. Espescially just the plain ActKey statements. I have not played with them in a while but I am not aware of anything that has changed or broken.

 

As for the second question. I have never had a reason to try that.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

ok thanks. I can get the LEDs to turn on using the GUI, but if I copy the code to the script engine it just doesnt work.

 

I might try re-installing target, maybe that will help/

 

cheers

Posted
ok thanks. I can get the LEDs to turn on using the GUI, but if I copy the code to the script engine it just doesnt work.

 

I might try re-installing target, maybe that will help/

 

cheers

 

If a reinstall doesn't work, post the code snippet that you are copying from the GUI. The GUI code sometimes is written strange. I seem to recall some issues when I was using code made by the GUI to figure some things out. That is really all I have ever used the GUI for.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted

found the problem with the LEDs

 

the 5 seperate LEDs use the intensity setting from the backlight.. :)

 

My profile sets the backlight to 0 on start so thats why I couldnt see the LED's

 

heh

 

Now I just need to figure out how to program x/y mapping on a toggle!

 

cheers

Posted

:lol:

 

Don'tcha hate it when the software does what you tell it.

 

...set intensity 0...turn light on...

 

I have done those kinds of things myself.

 

Later

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...