September 12, 20178 yr Is there a way to use linda or lua to constantly monitor the active Com1 frequency and write it to a simple text file. The file would simply get overwritten when a new active com1 frequency is selected? Thanks Brian
September 12, 20178 yr Hi Brian There is but what do you intend to do with the file data? There may be a more efficient way of passing through data to another process. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
September 12, 20178 yr Author I'm an old school visual foxpro programmer. When the com freq is changed, my VFP app needs to read it and then continue processing. I wrote a VB app a while back that would grab FS data to a text file for VFP to process it, but I lost the source code. Actually, remembering back, I think my VB app would put FS data into the keyboard buffer and my VFP app would read the buffer and continue processing Im not that good of a VB programmer to do all of it, hence the passing to VFP I tried using fsuipc to log the com changes but the log file only gets updated when fsuipc is closed.
September 12, 20178 yr Leave it with me for a few days. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
September 17, 20178 yr Hi Brian This should do what you wanted. Copy code into: \linda\libs\lib-user.lua or \linda\aircrafts\{your aircraft}\user.lua. function myCOM1(val) local strFreq = strFreq(getCOMFrequency(1, false)) _loggg('[LIBU] Com1=' .. strFreq) file = io.open ("vps.txt", "w+") io.output(file) io.write(strFreq) io.close(file) end event.offset(0x034E, "UW", "myCOM1") It runs only when the COM1 is changed and writes the string to file vps.txt. You can change the filename to suit your needs. If you place the code into lib-user.lua then it will work will all your aircraft whereas the user.lua is for the specific aircraft. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
Archived
This topic is now archived and is closed to further replies.