charlesml3 Posted February 26, 2013 Share Posted February 26, 2013 Borrowed the ideas and made it work for me... Gang, I read through this thread for a couple of days until I felt I understood all of the concepts and came up with what seems to me to be a pretty simple solution. Details: Joystick IDs: #1 : Warthog Throttle #2 : Saitek Pedals #3 : Warthog Stick Function Key Assignments: F14 - VAC Arm F15 - TrackIR Center (Code 126) F16 - TrackIR Lock (Code 127) For VAC, I set F14 in the Profile Builder. For TrackIR, I had to edit the .XML file in the profiles directory. The TrackIR GUI only lets you specify keys you can actually press, and my keyboard has no F15 or F16. Next, the AutoHotKey script. I went simple here. I just named it AutoHotkey.ahk which is the default that the program will load automatically. Here's the script: ; Joystick IDs: ; ; #1 : Warthog Throttle ; #2 : Saitek Pedals ; #3 : Warthog Stick ; ; Buttons: ; ; 3Joy4 : Warthog Stick Pinky Lever ; 1Joy3 : Warthog Throttle Mic switch Up 3Joy4:: KeyWait, 3Joy4 If (A_TimeSinceThisHotkey > 50 and A_TimeSinceThisHotkey < 1000) send {F15} ; Center TrackIR If (A_TimeSinceThisHotkey > 1000) send {F16} ; Pause TtrackIR 1Joy3:: Send {F14} ; Arm VAC That's it. I reduced the timings so the TrackIR Center would take just a tap on the pinky lever. The only other change was in VAC to have it use F14 to arm it. I suppose I could compile the script into a .exe file but I really don't see much value. I just start AutoHotKey and it loads the script automatically. If anyone sees potential for improvement, please feel free to make suggestions! Thanks a ton! -Charles Link to comment Share on other sites More sharing options...
CubPilot Posted March 1, 2013 Author Share Posted March 1, 2013 (edited) Not sure why you had the issue with the zip file. I did make it with 7-zip. But looks like you got it working on your own. Enjoy! As far as not making an .exe file of your script and running your script with AutoHotKey instead, the only thing I can see is the .exe file would use less system resources because AutoHotKey would not need to be running. I'm not sure how much resources AutoHotKey uses, so maybe it doesn't matter. Just saying. :pilotfly: Edited March 1, 2013 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 More sharing options...
charlesml3 Posted March 1, 2013 Share Posted March 1, 2013 Yea I thought about that. Just going on the filesize alone, the compiled script is just as big as AutoHotKey.exe anyway. Now that doesn't mean they both use the same amount of resources, of course. At any rate, I'm going to leave it like it is for now since I may tweak it a bit more and it's easy to do with it still in a script. Just tell AKH to reload it. -Charles Link to comment Share on other sites More sharing options...
CubPilot Posted March 1, 2013 Author Share Posted March 1, 2013 Works for me! :thumbup: :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 More sharing options...
POLARIS1 Posted November 19, 2014 Share Posted November 19, 2014 I know it's an oldy post...but...it seems like it's the only thread I found that has a solution to center the TrackIR software through the Warthog joystick, without using Target. Only two questions for someone who has ZERO knowledge at scripting and can barely understand the lingo used in this thread lol: 1. Does the first post's attached file work with TrackIR version 5.2.2? 2. Can somene edit the script so I can use a modifier with another button...eg a combo of two joystick buttons (I use the paddle joystick4 as a modifier with the joystick13 button)? Link to comment Share on other sites More sharing options...
CubPilot Posted November 20, 2014 Author Share Posted November 20, 2014 I think it will work with the latest TIR software, but I haven't tested it yet. As to your wanting to use a modifier I think that post #45 & 46 gives you what is needed. To understand the AHK code here are some tips (I'm no expert either). Anything to the right of a ";" is not code and does nothing when the program is run, it is usually describing what the code does to the left of the ";" if the creator chose to do this. So, "1joy6" means, if you read the description, Windows controller #1, joy button #6. (you can discover button numbers using windows Controller Settings/Properties). There are 2 loops in the post #46 code. Loop #1 starts at the beginning of the code. Inside loop #1 is a second loop #2, beginning with the "IF" statement and ending with the first "return" statement. It will loop until the buttons described in the loop are pressed, etc as coded there. It then goes to the second "return" statement and loops back to the very first line in the code. Hope this is of some help. :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 More sharing options...
POLARIS1 Posted November 20, 2014 Share Posted November 20, 2014 Well... Thank You mate !!! Took your advice and fiddled with those two posts until I came up with the solution: (Lever+DMS down on TM WH) 2Joy13:: ; y Joy x , y= controller ID number in windows, x= joy button number KeyWait, 2Joy13 ; Wait for 2Joy13 to be released x := A_TimeSinceThisHotkey ; Just assigning x here, for shorter "if's" GetKeystate, Button4status, 2Joy4 if (Button4status = "D") { ; If 2Joy13 and 2Joy4 is pressed, centre or pause TrackIR if (x < 500) ; If hotkey was held for less than 0.50 seconds, 500 ms Send {F15} ; Send the key F15 else if (x > 500) ; If hotkey was held for more than 0.50 seconds, 500 ms Send {F16} ; Send the key F16 return } return As you can see the major change is to line 5. In short...I now have a joystick controlled centering and pause :music_whistling: So...thank you for this thread, tips and help! Link to comment Share on other sites More sharing options...
CubPilot Posted November 21, 2014 Author Share Posted November 21, 2014 That's great that you got it working as you wanted. As they say, Give a man a fish & you feed him for a day. Give a man a fish pole & some bait, you feed him for a lifetime! (well, something like that, or until the bait runs out :smilewink:). :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 More sharing options...
Shaman Posted March 21, 2015 Share Posted March 21, 2015 As first stage is short input release at less then set time, then how to make it to send command at second stage no matter whether released or not, but just after elapsed time? Analogy is A-10C's HOTAS TMS UP behavior. 51PVO Founding member (DEC2007-) 100KIAP Founding member (DEC2018-) :: Shaman aka [100☭] Shamansky tail# 44 or 444 [sIGPIC][/sIGPIC] 100KIAP Regiment Early Warning & Control officer Link to comment Share on other sites More sharing options...
minimi66 Posted April 9, 2015 Share Posted April 9, 2015 Hi all, this is a bit off the specific thread topic but since its closely related i decided to see if anyone here could help? Hope that's ok? I've just got back into DCS A-10C and DCS World in general after a couple of years away from it due to being busy with other things. In the process of getting everything set back up again i have hit a problem with getting Fish's VAC A10C profile to work via my TM Warthog Throttle Mic Up button (3) and using thwe AutoHotkey WH_DCS_A-10_VAC_PTA.exe script posted by CubPilot? Basically, when testing in VAC Builder everything works perfectly other than the odd misunderstood phrase here and there. However, in A-10C when i key the PTA button and say a phrase from Fish's accompanying manual of usable phrases (as per his profile) the result is that i get kicked into the F5 Nearest Aircraft View and no radio message gets sent to my Wingman. Not sure whether this is a VAC or VAC Profile issue or an in-game Controls > Options problem. I am pretty mush using all the default HOTAS and Keyboard commands and haven't changed very much at all and nothing to do with Comms or View Commands. Any assistance or ideas would be appreciated? Many thanks. :thumbup: Windows 10 Pro 64-bit - Intel Core i9-13900K - 64GB Corsair Vengeance RAM @ 3200 MHz - ASUS TUF GAMING B660-PLUS WIFI D4 - Zotac NVIDIA GeForce RTX 4090 - 2TB INTEL NVMe SSD (Windows 10) - Samsung SSD 970 EVO Plus 1TB (DCS) - Crucial CT1000 1TB NVMe SSD - WinWing F-16EX Stick - WinWing Orion Throttle Base with both F-18 & F-16C TQS Throttle Grips - Saitek Pro Rudder Pedals - Logitech G-910 Keyboard - Logitech G-502 Lightspeed Mouse - Logitech G-533 Headset - Occulus Quest Pro VR - TrackIR 5 with Track Clip Pro Link to comment Share on other sites More sharing options...
doveman Posted April 9, 2015 Share Posted April 9, 2015 Check exactly which keys VAC is set to send for one of the phrases, then try pressing those keys in sim to check the expected behaviour results. It may be that the key the profile sends to open the radio is not the same the sim expects. The default key is RAlt+/ but the sim sees my English keyboard RAlt as something like OEM101, so you might need to remap all the commands that use RAlt so they look like OEM101+/ for example. Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen Link to comment Share on other sites More sharing options...
minimi66 Posted April 10, 2015 Share Posted April 10, 2015 Hi, Thanks very much for the reply, i am going to work on solving the problem today? I will post my solution if successful. Windows 10 Pro 64-bit - Intel Core i9-13900K - 64GB Corsair Vengeance RAM @ 3200 MHz - ASUS TUF GAMING B660-PLUS WIFI D4 - Zotac NVIDIA GeForce RTX 4090 - 2TB INTEL NVMe SSD (Windows 10) - Samsung SSD 970 EVO Plus 1TB (DCS) - Crucial CT1000 1TB NVMe SSD - WinWing F-16EX Stick - WinWing Orion Throttle Base with both F-18 & F-16C TQS Throttle Grips - Saitek Pro Rudder Pedals - Logitech G-910 Keyboard - Logitech G-502 Lightspeed Mouse - Logitech G-533 Headset - Occulus Quest Pro VR - TrackIR 5 with Track Clip Pro Link to comment Share on other sites More sharing options...
doveman Posted April 10, 2015 Share Posted April 10, 2015 Hi, Thanks very much for the reply, i am going to work on solving the problem today? I will post my solution if successful. You're welcome. Just to clarify in case it wasn't clear, I meant remap the open radio command in DCS, rather than editing the VAC profile. If DCS sees your RAlt key as OEM101, then it should receive that when VAC sends RAlt as well. Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen Link to comment Share on other sites More sharing options...
minimi66 Posted April 13, 2015 Share Posted April 13, 2015 Hi, I fixed the problem on Friday. In the DCS Options > Controls setup the Communications Menu keystroke "\" was present for the keyboard as well as my Throttle Button 3 which i have set up in VAC to trigger the Comms Menu in game. I cleared the "\" keyboard keystroke and just left Button 3 as the only mapped control for the Comms Menu. Clearly the Comms Menu keystroke was not being triggered in game and when i spoke a VAC command it just generated the F1, F3 etc keystrokes which was why VAC was triggering External View commands and not comms messages. That fixed it and it all now works perfectly! Thanks for all the assistance on both the threads i posted about this problem on. Stu :thumbup: Windows 10 Pro 64-bit - Intel Core i9-13900K - 64GB Corsair Vengeance RAM @ 3200 MHz - ASUS TUF GAMING B660-PLUS WIFI D4 - Zotac NVIDIA GeForce RTX 4090 - 2TB INTEL NVMe SSD (Windows 10) - Samsung SSD 970 EVO Plus 1TB (DCS) - Crucial CT1000 1TB NVMe SSD - WinWing F-16EX Stick - WinWing Orion Throttle Base with both F-18 & F-16C TQS Throttle Grips - Saitek Pro Rudder Pedals - Logitech G-910 Keyboard - Logitech G-502 Lightspeed Mouse - Logitech G-533 Headset - Occulus Quest Pro VR - TrackIR 5 with Track Clip Pro Link to comment Share on other sites More sharing options...
Bisch Posted January 9, 2016 Share Posted January 9, 2016 I love this solution and use it long time now. However. I want to use user made Target Profiles (for Mig21 in this case) but then, this doesnt work anymore. Is there a solution? Win 10 Pro | Trustmaster Warthog | MFG Rudders | VivePro Wireless Gear Lens modded | 1080ti OC Asus | 32 GB DD4 RAM | i7 9700 | Razer Chroma Orbweaver Keypad | Corsair KB | Derek Switchbox | USB Keypad | Logitech 502 | Jetseat with SimShaker Software | TrackIR5 | Autotkey | Thrustmaster Cougar MFDs | Monstertech Mounts | Saitek Throttle Quadrant Link to comment Share on other sites More sharing options...
CubPilot Posted January 10, 2016 Author Share Posted January 10, 2016 (edited) Are you talking about the AutoHotkey Track IR Center/Pause info? This thread went into other items & using similar solutions to those first posted. Are you saying if you use TARGET for your Mig 21 profile, Autohotkey doesn't work? More specific info about the problem you are having would be helpful. -CubPilot :pilotfly: Edited January 10, 2016 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 More sharing options...
fritzproject Posted April 28, 2016 Share Posted April 28, 2016 Hi at all. I need autohotkey script for center, stop and vac on my tm warthog. My id is 1 for the cloche so... i want to bind paddle (1joy4) and cms (1joy15) for pause. (1joy4) and cms (1joy17) for pause . And (1joy4) and 2joy3 mic switch. Can u explain how to do ? I try make it with 1joy4:: 1joy15:: If getkeystate ("1joy4") If getkeystate ("1joy15") Send +! {Numpad0) Whats wrong? Link to comment Share on other sites More sharing options...
jasonbirder Posted June 1, 2019 Share Posted June 1, 2019 Holy Thread Necromancy! Just come across this functionality as it seems an excellent way of controlling VAC and Viacom and my Headtracking Solution without recourse to Target Does anyone know if it will work with ED Tracker and Open Track by the simple expedient of using the same Centre/Pause Keys in Open Track - or is it more complicated than that? Link to comment Share on other sites More sharing options...
Shaman Posted February 2, 2022 Share Posted February 2, 2022 (edited) Hi all, Ressurecting this old thread because I find adding this information relevant and useful. I have returned after over five years to fly DCS, set up my sim pit, new Windows 10 installation and noticed I can't get this to work. What I have found out during t/s process is that TrackIR 5.4.2 drivers suffer regression compared to 5.4.1 drivers I have used back in 2016. Uninstalling 5.4.2 and installing 5.4.1 driver software enabled again use of F14 through F24 keyboard functions via AutoHotKey script reading joystick buttons. I hope this helps someone! Happy flying Edited February 2, 2022 by Shaman 51PVO Founding member (DEC2007-) 100KIAP Founding member (DEC2018-) :: Shaman aka [100☭] Shamansky tail# 44 or 444 [sIGPIC][/sIGPIC] 100KIAP Regiment Early Warning & Control officer Link to comment Share on other sites More sharing options...
Recommended Posts