Jump to content

Add TrackIR Center & Pause on 1 Joystick button


Recommended Posts

Add a TrackIR CENTER & PAUSE key to the HOTAS WARTHOG Joystick



Retain DCS A-10C HOTAS Warthog plug & play without using T.A.R.G.E.T.

This AutoHotKey script will add the TrackIR CENTER & PAUSE hotkeys to your HOTAS Warthog Joystick Pinky Lever. It will use the same format as the other buttons in that a short press of the lever will CENTER the TrackIR and a long press of the lever will PAUSE the TrackIR. The CENTER hotkey acts as a button press, the PAUSE hotkey acts as a toggle, turning the associated command ON or OFF. biggrin.gif

 

With the TrackIR CENTER button on the joystick it is really handy. However, only having the CENTER TrackIR button is not enough if you also need to use DCS A-10C's clickable cockpit. With TrackIR active it can be very hard to use the mouse to click those switches, etc. The slightest movement of your head usually moves the intended target of your mouse cursor anywhere except under the cursor.

 

With the HOTAS Warthog why use AutoHotKey and not the TM's T.A.R.G.E.T. software to do this? First, since the Warthog is "plug & play" with DCS A-10C it is easier to keep that functionality and not have to reinvent the wheel re-programming the joystick using T.A.R.G.E.T. Second reason is not having to have it running along with DCS A-10-C which could have a greater impact on your computers performance.

 

I can not take credit for the AutoHotKey script. I found it on the AutoHotKey website in the Documentation section and in the Forum.

 

I chose the F15 key to CENTER & the F16 key to PAUSE TrackIR and the included file uses these keys in setting up and re-mapping the joystick pinky lever. The result is no conflicts with DCS's default key bindings, I doubt that they will ever use these keys.

 

What's Needed:

 

- If you don't have AutoHotKey L installed go here to download the program.

 

- If you want to edit & compile (create .exe files) the AutoHotKey scripts a very nice editor is located here. It can also be used to modify the scripts, for instance to do the same to different controller buttons.

 

- Download my AutoHotKey script (the zip file in my post). The .exe file is used to set up TrackIR & to use with DCS A-10C. The .ahk file is for opening with the editor if you want to make changes to the script.

 

- I included a copy of JoyIDs. It is a neat little program that lets you move any connected controller to any Windows Controller ID#. Use it to put your controller on the ID# needed for the AHK script to work properly.

 

1/6/2013 Updated instructions:

UPDATE: I updated the readme file in the attached zip file. It now has pictures to help in getting this set up properly. This has been tested with TrackIR version 5.1 and 5.2 software with Win7 64 and would probably work for other versions also.

 

SETUP TrackIR

 

1. Install AutoHotKey L (if you haven't already).

 

2. Check to see what Windows Controller ID# your Warthog joystick is, It needs to be Controller #2 to work with the AHK script in the zip file below. Use "JoyIDs" to check the ID# and change it if needed.

3. Create your personal DCS A-10C TrackIR profile in the TrackIR software.

 

I suggest that you create a new DCS profile if you don't already have your own tweaked profile. You can use the downloaded TrackIR DCS A-10C profile from TrackIR for a baseline starting point and tweak the settings to your taste (you don't need to tweak it right now).

 

3a) Open TrackIR.

3b) Select the "Profiles Tab" and select "Default" in the Profile drop down box.

3c) To the right is a "+" & "-" sign with an Icon between them. Click on that Icon to copy the default profile and type in a new name in the window that opens (I named my personal DCS profile "CubbyDCS", my online name, + DCS, but use whatever works for you). Then click OK.

OR

 

3d) If you already have your tweaked DCS profile, Open the TrackIR software and make a note of the name of your personal (tweaked) DCS TrackIR profile.

 

4. To change the TrackIR "CENTER" & "PAUSE" Hotkeys. Open Windows Explorer and navigate to (assuming a default TrackIR install location in Win7) C: Program Files (x86)/NaturalPoint/TrackIR5/Profiles/(your profile name).xml

 

Open "(your profile name).xml" with Notepad or Notepad++ and edit the appropriate TrackIR Hotkeys manually. The Center & Pause Hotkey entries are near the bottom of the file (around line 205 if using Notepad++) and look something as shown below(some of the values may be different from what is shown if you have different options selected in your profile. The items we are concerned with shown are in bold type.

 

<Hotkey>

<Name>Center</Name>

<ActionID>1</ActionID>

<Key>126</Key>

<Enable>1</Enable>

<Toggle>1</Toggle>

<Trap>1</Trap>

<IsDevice>0</IsDevice>

<DeviceGuid>{00000000-0000-0000-0000-000000000000}</DeviceGuid>

<ButtonID>3</ButtonID>

</Hotkey>

<Hotkey>

<Name>Pause</Name>

<ActionID>2</ActionID>

<Key>127</Key>

<Enable>1</Enable>

<Toggle>1</Toggle>

<Trap>1</Trap>

<IsDevice>0</IsDevice>

<DeviceGuid>{00000000-0000-0000-0000-000000000000}</DeviceGuid>

<ButtonID>3</ButtonID>

</Hotkey>

Look for the "Center" Hotkey entry shown above in bold black type. Change the KEY value to "126" (F15=126) as shown in bold red type above.

 

Look for the "Pause" Hotkey entry shown above in black bold type. Change the KEY value to "127" (F16=127) as shown in red type above.

Save the file.

 

5. Open TrackIR. If your modified DCS profile is selected you need to load another profile. If the save profile window appears choose "NO". Then load your modified DCS profile again, F15 & F16 should be there now for the Center & Pause hotkeys.

 

NOTE: Checkmark TrackIR/ProfilesTab/Hotkeys/ ENABLE & TOGGLE options for PAUSE (F16) & CENTER (F15) Hotkeys.

6. Download and extract the zip file attached to this post. The DCS Saved Games folder might be a good place to put it.

7. Right click on "WH_DCS_A-10_TrackIR_short_long.exe".

Select Properties/Compatability Tab/Privilege Level, and check the

"Run this program as an administrator" box.

 

8. It's a good idea to make sure your TrackIR software is also run as an administrator at this time. It should be as that is part of the install instructions, but just in case......

 

USE WITH DCS A-10C

 

1. Double click on the " WH_DCS_A-10_TrackIR_short_long.exe " Icon to open the script if you put it on the desktop or placed an Icon on the desktop linked to its path on your computer.

 

I made a small ".bat" file that opens the AHK script for the TrackIR Center & Pause functions and another AHK script to open VAC with the proper profile and start VAC all in one click. Then I click to open DCS A-10C.

 

bat file:

rem DATE: 4/30/2012

rem

rem For DCS A-10C & HOTAS WArthog, by Ernie "Cubby" Smith

rem This starts AutoHotKeys key binding for TrackIR & VAC on Thrustmaster HOTAS Warthog

rem It also loads the DCS A-10C VAC profile & turns VAC ON

rem

@echo off

rem This assigns key "F14" to the HOTAS Warthog throttle COMMS button-UP, throttle must be on Controller ID #1

cd C:\Games\Flying\Eagle Dynamics\DCS World\AutoHotKey

start WH_DCS_A-10_VAC_PTA.exe

timeout /T 1 /nobreak

rem This assigns key short "F15" CENTER TrackIR key, long "F16" PAUSE TrackIR to the HOTAS Warthog joystick Paddle Lever, joystick must be on Controller ID #2

cd C:\Games\Flying\Eagle Dynamics\DCS World\AutoHotKey

start WH_DCS_A-10_TrackIR_short_long.exe

timeout /T 1 /nobreak

rem This opens VAC & loads the VAC DCS A-10 profile, then it turns VAC ON

cd C:\Program Files (x86)\VAC System

start VACSystem.exe DCS A-10C.xml,True

exit

(The paths to the AHK file locations would need to be edited to point to where you put your files if you want to try this as well as the file names if they are different. Any line beginning with "rem" is not executed, it only serves as a note as to what the code means or other info)

 

2. Open DCS A-10C and enjoy!

 

ENJOY!

 

pilotfly.gif

 

autohotkey-trackir-warthog_1-6-2013.zip


Edited by CubPilot
  • Like 1

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

Add a VAC PTA button to the HOTAS WARTHOG Throttle

 

Add a VAC PTA button to the HOTAS WARTHOG Throttle



To retain DCS A-10C HOTAS Warthog plug & play without using T.A.R.G.E.T.

 

 

This AutoHot Key script will add a VAC (Voice Activated Control) "Push To Activate Button" to the UP position of the Comms switch on the HOTAS Warthog Throttle.

 

I can not take credit for the AutoHotKey scripts. I found it on the AutoHotKey website in the Documentation section and adapted it to what I wanted to do.

 

I used " F14" for the VAC PTA Button (F13 to F24 are usable). This should result in no conflicts with DCS's default key bindings, I doubt that they will ever use these keys. The .ahk file can be edited for use with other joystick controllers as well as what button is used on your controller and what key is mapped to that button. The AutoHotKey ".exe" file in the zip file below uses the Radio "UP" button on the Warthog throttle. Another button could be used by modifing the AutoHotKey file. This leaves "Push" radio button on the Warthog throttle that DCS does not use and could be assigned for something else.

 

What's Needed:

 

- If you don't have AutoHotKey L installed go here to download the program.

 

- If you want to edit & compile (create the .exe files) the AutoHotKey scripts a very nice editor is located here. It can also be used to modify the scripts, for instance to do the same to different controller buttons.

 

- Download my AutoHotKey script (the zip file in my post). There is one .exe file and one .ahk file. The .exe & .ahk files of the same name go together, the .exe file is the compiled .ahk file. If you open the .ahk file in the editor or notepad there are more instructions for each file.

 

- I included a copy of JoyIDs. It is a neat little program that lets you move any connected controller to any Windows Controller ID#. This can come in handy to put controllers on the ID# that is needed for the AutoHotKey script to work properly, if needed.

 

5/22/12 Added instructions:

 

SETUP VAC (Voice Activated Control)

 

1. Open VAC Builder and load your DCS A-10C Profile (or make one).

2. In the Profile Activation Keys / Push To Activate Commands section Choose NONE for the first drop down box, choose F14 from the second drop down box.

3. In the same section choose DEFAULT, TOGGLE, or ARM.

 

- DEFAULT acts as a mic button, push to talk, let go when done. However, you will need to hold it down a bit longer after you are done talking to give the command enough time to be sent completely.

 

- TOGGLE acts like its name, push the button to activate VAC's mic, push the button again to turn off VAC's mic.

 

- ARM is probably the best choice (I used this one), push the button to talk & even if you let go part way through talking or part way through a sent command it turns off automatically only after the command has been sent in its entirety.

 

4. That's it for setting up VAC!

 

 

 

USE WITH DCS A-10C

 

1. Install AutoHotKey L (if you haven't already)

2a. Check to see what Windows Controller ID# your Warthog joystick is, It needs to be Controller #1 to work with the AHK script in the zip file below. Use "JoyIDs" to check the ID# and change it if needed.

OR

2b. The other option is to go to Windows/Start/Devices& Printers/Thrustmaster HOTAS Warthog Throttle/Game Controller Settings and choose Throttle - HOTAS Warthog/Advanced. Change your "Preferred Device" to Throttle - HOTAS Warthog. This will also assign it to Controller ID#1.

3. Download and open the zip file attached to this post.

4. Setup " WH_DCS_A-10_PTA.exe " to run as an administrator.

5. Double click on " WH_DCS_A-10_PTA.exe " Icon prior to opening DCS A-10C.

6. Open VAC (using your DCS A-10C profile) and turn it ON prior to opening DCS A-10C .

 

 

 

 

ENJOY!

 

pilotfly.gif

WH_DCS_A-10_VAC_PTA.zip


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

  • 3 weeks later...

Fantastic!! Didn't want to mess with TARGET or lua files (I miss Foxy!! :( ) so this is exactly what I was looking for. I combined the two and plan on using it with Track IR and Teamspeak.

 

Thanks very much!

PC spec: i9 9900KS @ 5.1ghz, 32GB RAM, 2 TB NVME M2, RTX 3090

Peripherals: TM Warthog, Saitek Pro Flight Pedals, Rift S, Custom UFC

Link to comment
Share on other sites

Fantastic!! Didn't want to mess with TARGET or lua files (I miss Foxy!! :( ) so this is exactly what I was looking for. I combined the two and plan on using it with Track IR and Teamspeak.

 

Thanks very much!

 

Hope it works for you. If you have any problems, post here and I will try to help.

 

Now, for the AI Comms you might try adding VAC (voice activated commands). It works well also and it allows selecting the options without using a keyboard. Just push the VAC PTA key & say the command or phrase.

 

I have added the steps needed to setup & use the TrackIR AutoHotKey files with a HOTAS Warthog in the first post.

 

 

 

 

:pilotfly:


Edited by CubPilot
  • Like 1

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

I forgot to add that because I use two AutoHotKey scripts (for TrackIR & VAC) and the VAC program, I made a .bat file to open both AutoHotKey scripts and open VAC with the proper profile (A-10C in this case) and turn VAC ON...... all with one click. Then I open A-10C.

 

rem DATE: 4/30/2012
rem
rem For DCS A-10C & HOTAS WArthog, by Ernie "Cubby" Smith
rem This starts AutoHotKeys key binding for TrackIR & VAC on Thrustmaster HOTAS Warthog
rem It also loads the DCS A-10C VAC profile & turns VAC ON
rem
@echo off
rem This assigns key "F14" to the HOTAS Warthog throttle COMMS button-UP, throttle must be on Controller ID #1
cd C:\Users\Cubby\Desktop\AutoHotKey\Start Up\DCS A-10C_AutoHotKey
start WH_DCS_A-10_PTA.exe
timeout /T 1 /nobreak
rem This assigns key short "F15" CENTER TrackIR, key long "F16" PAUSE TrackIR to the HOTAS Warthog joystick Paddle Lever, joystick must be on Controller ID #2
cd C:\Users\Cubby\Desktop\AutoHotKey\Start Up\DCS A-10C_AutoHotKey
start WH_DCS_A-10_TrackIR_short_long.exe
timeout /T 1 /nobreak
rem This opens VAC & loads the VAC DCS A-10 profile, then it turns VAC ON
cd C:\Program Files (x86)\VAC System
start VACSystem.exe DCS A-10C.xml,True
exit

:D

 

 

 

 

:pilotfly:


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

I have added some instructions for setting up VAC (Voice Activated Control) and the AutoHotKey script for a Push to Activate button to the HOTAS Warthog.

 

 

 

 

 

 

:pilotfly:

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

  • 2 weeks later...

I can't get the first one to work. I manage to get TIR to map pause and reset to F15, F16 by pressing the pinky lever, but TIR doesn't react to that switch afterwards, neither long or short presses.

 

EDIT: actually, it seems restarting the software did the trick. Awesome!

 

EDIT 2: This thread seems as good as any: in the interest of avoiding desktop clutter, I'm trying to start the relevant hotkey script, the TIR software and DCS world at the same time in a small .bat file.

For some reason, I can't open DCS.exe or Launcher.exe directly by clicking them in the install directory. It seems they need to be run in a different folder than the one they're in. Anyone know how you can do this with a .bat?


Edited by Corrigan

Win10 x64 | SSDs | i5 2500K @ 4.4 GHz | 16 GB RAM | GTX 970 | TM Warthog HOTAS | Saitek pedals | TIR5

Link to comment
Share on other sites

I can't get the first one to work. I manage to get TIR to map pause and reset to F15, F16 by pressing the pinky lever, but TIR doesn't react to that switch afterwards, neither long or short presses.

 

EDIT: actually, it seems restarting the software did the trick. Awesome!

 

EDIT 2: This thread seems as good as any: in the interest of avoiding desktop clutter, I'm trying to start the relevant hotkey script, the TIR software and DCS world at the same time in a small .bat file.

For some reason, I can't open DCS.exe or Launcher.exe directly by clicking them in the install directory. It seems they need to be run in a different folder than the one they're in. Anyone know how you can do this with a .bat?

 

 

If you find out how to get A-10C to load from the .bat file let me know too. Didn't work for me either, that's why I run the .bat file for the AutoHotKey scripts & VAC, then open A-10C normally by clicking on the icon. I can live with two clicks to get it going but one would be better. I haven't tried this with DCS World yet, but, I guess that's in the cards in the future.

 

I think it might be that A-10C doesn't like it, so it won't open that way.

 

 

:pilotfly:


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

Hey Cub, wanna say thanks for the great VAC pta button, works real nice and I was wondering if it's possible to make one for BS2 as well? thanks again.

 

If you can't use your controller software to do it I'm pretty sure it will work with BS2 or any other sim & controller. You need to find out what the controller ID# is, and the button number you want to use on that controller and substitute those #'s in the AutoHotKey script. Then edit the AutoHotKey script and after it does what you want it to do compile it into the .exe file & rename it.

 

JoyID's will show you what your controller ID# is and windows will show the button number on that controller.

 

 

 

:pilotfly:

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

I'm having some weird trouble with this: TIR recognises the mappings when the software is in focus, but when I have the sim in focus, the pause and centre commands don't work. TIR tracks my movements correctly. Ideas?

Win10 x64 | SSDs | i5 2500K @ 4.4 GHz | 16 GB RAM | GTX 970 | TM Warthog HOTAS | Saitek pedals | TIR5

Link to comment
Share on other sites

I'm having some weird trouble with this: TIR recognises the mappings when the software is in focus, but when I have the sim in focus, the pause and centre commands don't work. TIR tracks my movements correctly. Ideas?

 

Hmm... You are using the correct AutoHotKey script (WH_DCS_A-10_TrackIR_short_long.exe) and running it before opening A-10C as well as TIR? I'm guessing yes, but needed to ask. Also make sure your controller ID= #2 for the controller with the button you are using for TIR.

 

It might also be something with TrackIR. I have the "Exclusive" check box checked for the A-10C profile in TIR. I also have the "Enable", "Toggle", & "Trap" boxes checked.

 

Let me know what fixes this problem, if it does. I will modify the instructions.

 

 

 

:pilotfly:


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

I'm using a simple .bat to launch both the script and TIR, but they're in the right order. Then I launch DCS. I'll mess around a bit and let you know if I get it working!

Win10 x64 | SSDs | i5 2500K @ 4.4 GHz | 16 GB RAM | GTX 970 | TM Warthog HOTAS | Saitek pedals | TIR5

Link to comment
Share on other sites

OK. Um, try the AHK .exe without using your .bat file. If it works then there is a problem with the .bat file. Could be the path to the AHK .exe file is incorrect or the name of the AHK .exe file is incorrect or a formatting problem with the .bat file. It's easy to make a typo.

 

It shouldn't matter which file is opened first, TrackIR or the AHK .exe, they both just need to be opened before A-10C is started.

 

Are you using Win7 64bit (I am)?

 

 

 

:pilotfly:


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

Yeah, but using the .bat successfully launches both script and TIR, so it's rather strange if that is the problem.

 

I am using x64 win7, yes. It could have been just a one-off anomaly. I'll try again with a rebooted computer and starting the stuff individually later when I find time.

 

Thanks for the help!

Win10 x64 | SSDs | i5 2500K @ 4.4 GHz | 16 GB RAM | GTX 970 | TM Warthog HOTAS | Saitek pedals | TIR5

Link to comment
Share on other sites

Ummm ..... I don't mean to insult your intelligence. I'm just thinking out loud about what may be preventing this to work for you.

 

I have it working here with the stand alone A-10C & with the DCS World A-10C version.

 

Another thought is trying to run the script in Administrator mode.

 

 

 

:pilotfly:

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

No worries my friend, my intelligence has thicker skin than that :P

I can't get it to work still, but I think it has nothing to do with your clever scripts. It doesn't matter if I set another key than F15, F16 -- it still doesn't work. I can't get TIR to centre or pause if the sim (DCS) is in focus. If I click the second screen to bring DCS out of focus, centring works, and even the DCS camera, visible because I run windowed mode, centres. Weird.

 

 

ADDENDUM: So I messed about a bit, and it seems it's only when DCS is in focus the commands don't work. Running in full screen makes no difference, and I can't find any bind for either the joystick pinky button (4) or F15, F16.

 

 

EDIT: Yeah, ok... So, I was being an idiot. Thought I was running everything as admin, but I wasn't. Works now. Thanks for the help again!


Edited by Corrigan

Win10 x64 | SSDs | i5 2500K @ 4.4 GHz | 16 GB RAM | GTX 970 | TM Warthog HOTAS | Saitek pedals | TIR5

Link to comment
Share on other sites

No worries my friend, my intelligence has thicker skin than that :P

I can't get it to work still, but I think it has nothing to do with your clever scripts. It doesn't matter if I set another key than F15, F16 -- it still doesn't work. I can't get TIR to centre or pause if the sim (DCS) is in focus. If I click the second screen to bring DCS out of focus, centring works, and even the DCS camera, visible because I run windowed mode, centres. Weird.

 

 

ADDENDUM: So I messed about a bit, and it seems it's only when DCS is in focus the commands don't work. Running in full screen makes no difference, and I can't find any bind for either the joystick pinky button (4) or F15, F16.

 

 

EDIT: Yeah, ok... So, I was being an idiot. Thought I was running everything as admin, but I wasn't. Works now. Thanks for the help again!

 

It is hard to tell how someone feels from a post sometimes.

 

Anyways, glad it is working for you now. I have made changes to my instructions to cover the problem you had.

 

Cheers! :beer:

 

 

:pilotfly:

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

  • 2 weeks later...

Hi mate, I still can't get this to work so not sure what I'm doing wrong. I changed the script as such as I wanted the pta for the pinky paddle on the yoystick (joystick is #1):

 

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Process, Priority, , High

 

1Joy4:: ; y Joy x , y= controller ID number in windows, x= joy button number

Send, {F14 down} ; Sends a press to application

SetTimer, WaitForButtonIn4, 10

return

 

WaitForButtonUp4:

if GetKeyState("1Joy4") ; The button is still down, so keep waiting

return

; Otherwise the button has been released

Send, {F14 up}

SetTimer, WaitForButtonIn4, off

return

 

 

I've saved the file and open it (although I get a window popping up saying - Error Target label does not exist then the list of actions then at the bottom - This program will now exit) prior to opening VAC and DCS. I'm not using the trackir bit as that is already mapped in the trackir software. Any ideas? Thanks

MSI M5 z270 | Intel i5 7600k (OC) 4.8GHz | MSI GTX1080ti Gaming X 11Gb | 500gb Samsung 970 Evo NVME M.2 (DCS World) | 500gb Samsung 850 Evo SSD (OS and Apps) | 32Gb 2400MHz DDR4 - Crucial Ballistix | Be Quiet Silent Loop 240mm | NZXT H440 case |

 

Thrustmaster Warthog - 47608 with Virpil Mongoose joystick base | MFG Crosswinds - 1241 | Westland Lynx collective with Bodnar X board | Pilot's seat from ZH832 Merlin | JetSeat | Oculus Rift S | Windows 10 | VA |

Link to comment
Share on other sites

  • 1 month later...
Hi mate, I still can't get this to work so not sure what I'm doing wrong. I changed the script as such as I wanted the pta for the pinky paddle on the yoystick (joystick is #1):

 

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Process, Priority, , High

 

1Joy4:: ; y Joy x , y= controller ID number in windows, x= joy button number

Send, {F14 down} ; Sends a press to application

SetTimer, WaitForButtonIn4, 10

return

 

WaitForButtonUp4:

if GetKeyState("1Joy4") ; The button is still down, so keep waiting

return

; Otherwise the button has been released

Send, {F14 up}

SetTimer, WaitForButtonIn4, off

return

 

 

I've saved the file and open it (although I get a window popping up saying - Error Target label does not exist then the list of actions then at the bottom - This program will now exit) prior to opening VAC and DCS. I'm not using the trackir bit as that is already mapped in the trackir software. Any ideas? Thanks

 

Sorry for the delay, I have had major 'puter problems as well as ISP connection problems.

 

Your script looks OK.

 

You say you made the changes and saved it. Did you compile the script or only save the script file? The saved script file will have an ".ahk" extension and is not used to do the actual work. The compiled script will have a ".exe" extension and that is what is to be executed prior to starting A-10C. I use "SciTE4AutoHotkey" to make or edit AHK scripts and compile them. Also AutoHotKey needs to be installed or else the scripts will not work.

 

 

:pilotfly:

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

  • 3 months later...

(Apparently) I made a mistake. I upgraded to TrackIRv5.2 Final and now, nothing works. After many happy months using my WH paddle with Auto Hot Keys and the files in the original post, now I can only assign the paddle to "Joystick4" in the TIR profile. I have tried many times and only "Joystick4" comes up, not F15 (to center) or F16 (to pause). I assigned a keyboard button (the "Previous Track" button) for Precision, but that's not working anymore either - in fact, the new TIR won't even recognize it as a button press.

 

Anyone have any suggestions as to how I can get this working again?

 

Thanks,

-Drew

Link to comment
Share on other sites

(Apparently) I made a mistake. I upgraded to TrackIRv5.2 Final and now, nothing works. After many happy months using my WH paddle with Auto Hot Keys and the files in the original post, now I can only assign the paddle to "Joystick4" in the TIR profile. I have tried many times and only "Joystick4" comes up, not F15 (to center) or F16 (to pause). I assigned a keyboard button (the "Previous Track" button) for Precision, but that's not working anymore either - in fact, the new TIR won't even recognize it as a button press.

 

Anyone have any suggestions as to how I can get this working again?

 

Thanks,

-Drew

I haven't updated TIR to v 5.2 yet, so that could be the problem.

 

You remembered to use the two AHK scripts to set up the Center & Pause keys in TIR?

 

It looks like you did set the joystick to Controller ID#2, so that should be OK.

 

I know with the TIR v 5.1 software I sometimes needed to run the script more than once to get F15 & F16 to be registered correctly in TIR. Otherwise it would be registered as "Joystick4" button in TIR.

 

Is there a big advantage to using TIR v 5.2 vs. v 5.1 ?

 

 

:pilotfly:


Edited by CubPilot

[sIGPIC][/sIGPIC]

Win7 Pro 64 | Asus Rampage III Extreme |Swiftech H2O cooled: CPU, Video, N. Bridge | i7 980X EE @4.5GHz | 16 GB DDR3 @1726 MHZ | AMD R9 290X 4GB DDR5 +EK H2O block+Backplate | BenQ XL2730Z 2560x1440 @144Hz | Samsung 850 EVO SSD 500GB | 2 - Samsung HD 1TB | Pinoeer BD-RW | ASUS Xonar DX 7.1 PCIe Audio | CoolerMaster Haf-X case | PC Power & Cooling Silencer 760W PS | HOTAS Cougar w/Evenstrain Mod | HOTAS Warthog | TM RCS Rudders + Mods | TM MFD's w/monitors | TrackIR5

Link to comment
Share on other sites

try this much simpler AHK script and change a/b to your needs:

1Joy4::

 

KeyWait, 1Joy4

If (A_TimeSinceThisHotkey < 500)

send a

; when button is released within 0,5 seconds = "a"

 

If (A_TimeSinceThisHotkey > 500 )

send b

; when button is released after 0,5 seconds = "b"

And here is a showcase how I have 4diffrent functions at my paddle switch:

 

Following script executes TrackIR Center (=Numpad5) and center the cockpit view when I press longer than 2sec.

 

when releasing after 0,5 seconds it will Pause TrackIR (=F14) without centering.

 

And when I release instantly, it will only toggle between gradually zoom in/out (Toggle/Loop).

 

 

Toggle = 0

 

4Joy4::

 

KeyWait, 4Joy4

 

If (A_TimeSinceThisHotkey > 500 and A_TimeSinceThisHotkey < 2000 )

send {F14} ; Pause TrackIR

 

If (A_TimeSinceThisHotkey > 2000)

send {NumpadEnter}{Numpad5 Down}{Numpad5 Up} ; Center RrackIR and Cockpit View

 

 

 

 

If (A_TimeSinceThisHotkey < 500 )

{

If Toggle = 0

 

{

send {NumpadEnter} ; default FOV

Loop 20 ; how many times "*" is pressed

{

Sleep, 2

send {NumpadMult Down}

}

send {NumpadMult Up} ; zoom in

}

 

else

{

Loop 20 ; how many times "/" is pressed

{

Sleep, 2

send {NumpadDiv Down}

}

send {NumpadDiv Up}{NumpadEnter} ; zoom out and default FOV

}

Toggle := Toggle<1 ? 1 : 0

}

 

 

return

;


Edited by PeterP

Link to comment
Share on other sites

  • Recently Browsing   0 members

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