March 17, 20242 yr Author I understand that the script will only be valid for one livery. I will test your latest script next week with thank you again for your patient olivier
March 17, 20242 yr Commercial Member 4 minutes ago, ptimale said: that the script will only be valid for one livery. Correct. You would have to make a new aircraft.cfg somewhere else, where you simply collect all the others into one single file. Then point the script at that, it should be able to figure it out. The next version of AAO will have an LVar "(L:AirFile, String)" that will (for MSFS) contain the current path to the airfile.cfg. It is up to you to send me that email 🙂 Edited March 17, 20242 yr by Lorby_SI LORBY-SI
March 17, 20242 yr Commercial Member 3 hours ago, ptimale said: I understand that the script will only be valid for one livery. I will test your latest script next week with thank you again for your patient olivier I'm sorry, but after checking it our with the latest version of the Fenix, I have come to the conclusion that my idea won't work. The sim is not reporting the actual location of the aircraft.cfg in use at all, it is always pointing at the "Master" file in the Fenix folders. It is not possible to find the correct file that way. The only option would be if you combine all aircraft.cfgs into one and point the script at that files. But honestly, I would stick to SimBrief. That sounds like the best solution to me. Edited March 17, 20242 yr by Lorby_SI LORBY-SI
March 18, 20242 yr Commercial Member Two additional helpful SimBrief scripts: https://www.avsim.com/forums/topic/643187-simbrief-read-wind-information/?do=findComment&comment=5080391 LORBY-SI
March 18, 20242 yr Commercial Member If you wonder how to refresh the EFB "mid-flight", for example if you swap the background image when the simulation is already running - there may be a solution, but it is not for the faint of heart. And it will completely reset the EFB. In theory this should then show the new background image. 0. Make sure that the sim is not running. 1. Find this file: \Community\fnx-aircraft-320\html_ui\Pages\VCockpit\Instruments\FNX32X\EFB\EFB_Captain.js and open it in Notepad++ 2. Change the code to this (new code in bold font) Quote class EFB_Captain extends BaseInstrument { get isInteractive() { return true; } constructor() { super(); } get templateID() { return "EFB_Captain"; } connectedCallback() { super.connectedCallback(); SimVar.SetSimVarValue("L:N_BRIGHTNESS_EFB_CAPT", "number", 0.5); } disconnectedCallback() { super.disconnectedCallback(); } Update() { super.Update(); var refChk = SimVar.GetSimVarValue("L:REFRESH_EFB_CAPT", "number"); if (refChk == 1){ SimVar.SetSimVarValue("L:REFRESH_EFB_CAPT", "number", 0); window.location.reload(); } } } registerInstrument("efb-captain-element", EFB_Captain); 3. Save. Now you can force a refresh by triggering the LVar from AAO or any other app:1 (>L:REFRESH_EFB_CAPT, Number) Edited March 18, 20242 yr by Lorby_SI LORBY-SI
March 18, 20242 yr If you are just interested in refreshing the efb after setting the bg.jpg file, can't you just add the line window.location.reload(); at the end of the previous script and run it as an aircraft automated script?
March 19, 20242 yr Commercial Member 8 hours ago, ha5mvo said: If you are just interested in refreshing the efb after setting the bg.jpg file, can't you just add the line window.location.reload(); at the end of the previous script and run it as an aircraft automated script? No. One has nothing whatsoever to do with the other. The reload must be executed inside the HTML instrument in the sim itself. LORBY-SI
March 19, 20242 yr Author 20 hours ago, Lorby_SI said: Si vous vous demandez comment rafraîchir l'EFB "en plein vol", par exemple si vous échangez l'image de fond alors que la simulation est déjà en cours, il existe peut-être une solution, mais elle n'est pas pour les âmes sensibles. Et cela réinitialisera complètement l’EFB. En théorie, cela devrait alors afficher la nouvelle image d'arrière-plan. 0. Assurez-vous que la carte SIM n'est pas en cours d'exécution. 1. Recherchez ce fichier : \Community\fnx-aircraft-320\html_ui\Pages\VCockpit\Instruments\FNX32X\EFB\EFB_Captain.js et ouvrez-le dans Notepad++ 2. Remplacez le code par ceci (nouveau code en gras) 3. Enregistrez. Vous pouvez désormais forcer un rafraîchissement en déclenchant la LVar depuis AAO ou toute autre application : 1 (>L:REFRESH_EFB_CAPT, Number) tube is too loud I looked to see if there was a variable to restart the EFB in configuration files Thanks a lot
March 19, 20242 yr Author (LOAD_SIMBRIEF)·(SPLIT:2500)· 'C:\ProgramData\Fenix\FenixSim·A320\efb\img\'·(L:simbrief.general.icao_airline,·String)·scat·'.png'·scat·'C:\ProgramData\Fenix\FenixSim·A320\efb\img\bg.png'·(COPYFILE:%s1|%s2) 1·(>L:REFRESH_EFB_CAPT,·Number) (SPLIT:10000)· 'C:\ProgramData\Fenix\FenixSim·A320\efb\img\bg.png'·(DELETEFILE:%s1)· It works very well thank you even though I didn't have a problem before at least now we have a variable to refresh the efb Edited March 19, 20242 yr by ptimale modif
Archived
This topic is now archived and is closed to further replies.