January 2, 20242 yr ... to perform all you have dreamed to do from your VR cockpit. I was looking for such solution since I fly with a VR headset, more than 2 years ago now. With the fantastic OpenKneeboard free app (I took me some time to understand its power) + a simple AutoHotKey script, I'm able to: Read any set of Pdf documents (native Pdf, not bitmap converted) and navigate inside without latency Display any Desktop App, refreshed in real time Interact with your mouse with the Desktop app you display All this without leaving the VR cockpit, without performance impact, and with native headset crisp full resolution, like you can see with the OXRTK menu. Then all our sim apps which are "not VR compliant" are now VR ready See how you can use Pilot2ATC, Self Loading Cargo, the incoming BeyondATC and more... Roland MSFS my local airport release: LFOR Chartres-Metropole MSFS Plugins RAAS (registered FSUIPC7 required) MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites
January 2, 20242 yr Author Here is an AHK script sample for the following scenario: You want to display and interact with Pilot2ATC. In OKB: You add a "Window capture" tab, and set it to capture Pilot2ATC window. Let say you want to bind button 6 of your controller #1 to switch the focus as long as you maintain the button down, and get back to MSFS focus when finished: global appP2A:="ahk_exe Pilot2ATC_2021.exe" global mfs:="ahk_exe FlightSimulator.exe" 1Joy6:: { if not WinExist(appP2A) return switchApp("1Joy6",appP2A) } switchApp(key,app) { OutX:=0 OutY:=0 OutWidth:=0 OutHeight:=0 SendInput "{Blind}!{Tab}" Sleep 100 WinActivate app WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight MouseMove OutWidth/2,OutHeight/2 KeyWait key SendInput "{Blind}!{Tab}" WinActivate mfs } When you push the button, the mouse is moved to the center of the client app and you can interact with it until you release it. Simple, no? >>> OpenKneeBoard on GitHub Edited January 2, 20242 yr by roland_lfor Roland MSFS my local airport release: LFOR Chartres-Metropole MSFS Plugins RAAS (registered FSUIPC7 required) MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites
January 2, 20242 yr AutoHotKey rules. Been using it for 15+ years. The script I use for control bindings and useful VR functions in MSFS has steadily grown to around 1000 lines of code... And part of it is exactly for interacting with OpenKneeboard and switching input between MSFS and Pilot2ATC like you do.
January 2, 20242 yr Author So you say I'm late to the party... thanks, never read it anywhere. I thought it could be useful. Roland MSFS my local airport release: LFOR Chartres-Metropole MSFS Plugins RAAS (registered FSUIPC7 required) MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites
January 14, 20242 yr On 1/2/2024 at 10:22 PM, roland_lfor said: Here is an AHK script sample for the following scenario: You want to display and interact with Pilot2ATC. In OKB: You add a "Window capture" tab, and set it to capture Pilot2ATC window. Let say you want to bind button 6 of your controller #1 to switch the focus as long as you maintain the button down, and get back to MSFS focus when finished: global appP2A:="ahk_exe Pilot2ATC_2021.exe" global mfs:="ahk_exe FlightSimulator.exe" 1Joy6:: { if not WinExist(appP2A) return switchApp("1Joy6",appP2A) } switchApp(key,app) { OutX:=0 OutY:=0 OutWidth:=0 OutHeight:=0 SendInput "{Blind}!{Tab}" Sleep 100 WinActivate app WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight MouseMove OutWidth/2,OutHeight/2 KeyWait key SendInput "{Blind}!{Tab}" WinActivate mfs } When you push the button, the mouse is moved to the center of the client app and you can interact with it until you release it. Simple, no? >>> OpenKneeBoard on GitHub Tried running this script but I get an error on line 67 (WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight) saying that this line contains no recognized action. Any help will be appreciated, thanks!
January 14, 20242 yr 19 minutes ago, Divij said: (WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight) saying that this line contains no recognized action Are you running AutoHotKey v2? I would expect you'd get that error in AutoHotKey v1 as WinGetClientPos doesn't exist in v1.
January 14, 20242 yr 22 minutes ago, JacquesBrel said: Are you running AutoHotKey v2? I would expect you'd get that error in AutoHotKey v1 as WinGetClientPos doesn't exist in v1. Thank you! That was the problem. Using Navigraph Charts in VR this way feels a lot smoother. Out of curiosity, is there a performance hit using Open Kneeboard in VR in MSFS?
January 14, 20242 yr Author 1 hour ago, Divij said: Out of curiosity, is there a performance hit using Open Kneeboard in VR in MSFS? It's very low, even on my old system. Roland MSFS my local airport release: LFOR Chartres-Metropole MSFS Plugins RAAS (registered FSUIPC7 required) MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites
January 14, 20242 yr Understood, thanks! This makes using Charts so much faster in VR rather than relying on the airplane EFB. Is it possible to edit this code for it to work with 2 Programs (Charts +vPilot). So using the same joystick hot key for mouse interaction but for 2 apps depending on which one is in focus in the Kneeboard.
January 15, 20242 yr Author No, you have to use 2 different hotkeys because it's not possible to know which tab is on OpenKneeBoard focus from AHK. Roland MSFS my local airport release: LFOR Chartres-Metropole MSFS Plugins RAAS (registered FSUIPC7 required) MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites
January 15, 20242 yr Got it. So would this edited code work for what I am looking to do? global appP2A:="ahk_exe Navigraph Charts.exe" global appP3A:="ahk_exe vpilot.exe" global mfs:="ahk_exe FlightSimulator.exe" 1Joy20:: { if not WinExist(appP2A) return switchApp("1Joy20",appP2A) } 1Joy5:: { if not WinExist(appP3A) return switchApp("1Joy5",appP3A) } switchApp(key,app) { OutX:=0 OutY:=0 OutWidth:=0 OutHeight:=0 SendInput "{Blind}!{Tab}" Sleep 100 WinActivate app WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight MouseMove OutWidth/2,OutHeight/2 KeyWait key SendInput "{Blind}!{Tab}" WinActivate mfs } Apologies for all the trouble but this is truly a gamechanger for me if I can get it to work 🙂 Edited January 15, 20242 yr by Divij
January 15, 20242 yr As mentioned there isn't a way that you can get information from OpenKneeboard about which tab is currently open. But you can switch tabs from AutoHotKey using the various RemoteControl-*.exe files in OpenKneeboard: https://openkneeboard.com/features/remote-controls.html#openkneeboard-remotecontrol-set_tabexe - so you could have your script switch to a specific tab and then set mouse focus in the specific app. If you want one button to do more than one thing, you could use short press/long press, eg. on a short press switch to tab A, on a long press switch to tab B. Code example here: https://www.autohotkey.com/boards/viewtopic.php?t=88662 (v1 script, so it needs to be modified for v2)
March 4, 20242 yr @roland_lfor or someone, great, just seeking this to begin a bit in IVAO again, though in VR, and like many others I found this problem, and if I want the IVAO Pilot Client Altitude in the VR cockpit?, what do I do? Where those scripts go? A good manual?, I don´t have tablets installed in the OpenTabletDriver, or what I do?, what a mess, I have the plugin Kneeboard OTD-IPC in it installed, but nothing hahaha, "No tablets were detected". Ah, ok, there are 3 pages in the "Quick Start" manual pressing the 3 lines button, ok, I have the IVAO windows capture already, I will continue testing and investigating. Edited March 4, 20242 yr by peloto
March 4, 20242 yr I’ve downloaded OpenKneeboard and setup 4 window capture tabs for the apps I want to bring into MSFS. I would like to use AHK as described above but rather than hold the button down, I would like to press a button to bring the window in then press the same button to return to MSFS. Do I just need an additional sendinput or can I just remove the keywait?
Create an account or sign in to comment