Jump to content
The simFlight Network Forums

ark1320

Members
  • Content Count

    196
  • Joined

  • Last visited

  • Days Won

    4

ark1320 last won the day on July 27 2017

ark1320 had the most liked content!

Community Reputation

5 Neutral

About ark1320

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Colorado, USA

Recent Profile Visitors

1,682 profile views
  1. Hi Pete, I can't seem to find how to specify the formatting of string variables for a CSV file using, I assume, the newline \n character. I know how to do it with numerical variables, but am not having any luck with string variables. For example, using something like file:write(string.format("%-3s %-6s %-5s ", str_var1, \n str_var2, \n str_var3 \n )) I want to end up with the value of each string variable on a separate line in the CSV file but can't seem to get the syntax correct. Thanks for any suggestions, Al
  2. At the end of a flight I'd like to use a Lua script to save a small number of offset values (fuel tank quantities) to be read and loaded at the next sim session. As far as I can tell there are no special facilities for this in the FSUIPC lua library, so I assume I will need to learn how to use standard Lua io methods for reading and writing files. If anyone has any recommendations on how best to proceed or where to look for good examples, that would be most appreciated. Thanks, Al
  3. Yes, I understand. I'm familiar with negative number representation. Thanks, Al
  4. Hello Pete, Does n= ipc.readLvar() assume a particular data format for the value n read (byte, word, floating point, etc), or does it just default to the Lvar's format? I'm asking because if I read an Lvar value and then want to write it to an offset with ipc.writeXX(0x1234, n), I need to decide what XX is (UB, SW, DBL, etc). Best for the holidays, Al
  5. ark1320

    ipc.writeSTR() Window

    Ah, it was the single line vs multi-line difference that I didn't understand. Thanks very much for clearing that up. Al
  6. Hi Pete, It seems in P3Dv4.3 that sometimes the code ipc.writeSTR(0x3380, " text ") ipc.writeSW(0x32FA, n) writes to the sim's 'Green Bar', and other times to the common Simconnect window. Is there a way to force the output text to the "Green Bar", and to know to which type of display window the output will go? Thx, Al FSUIPC5.141e Win10
  7. ark1320

    P3Dv4 Display Help Needed

    OK, yes, I use the Window mode with P3D4, so that explains why it didn't work. Not really important in the scheme of things right now. I will send you an email now so you can respond on Monday at your convenience. Thanks, Al
  8. ark1320

    P3Dv4 Display Help Needed

    Sure, glad to help. I can just uncomment the ipc.setdisplay() commands in my scripts to test things. Maybe ipc.setdisplay(SET_PERCENTS: x, y, cx, cy) The : after PERCENTS implies the x,y,cx,cy parameters are percentages, at least to me. 😊 BTW, the RestoreSimcWindows=Yes option does not seem to work for me -- another P3Dv4 casualty I guess. Al
  9. ark1320

    P3Dv4 Display Help Needed

    Ah, a great tip -- thanks! Al
  10. ark1320

    P3Dv4 Display Help Needed

    Pete, In regard to my second post above about NO display after reinstalling P3Dv4, the solution to the problem was I needed to check the Message Text box found on the P3Dv4 Information Tab under MISCELLANEOUS TEXT. That little detail has cost me many many hours of grief, so I hope this helps someone! Regarding my first post above, I have found the best temporary solution is to grab and reposition/resize the SimConnect Msg window as I want it and leave it there for all Lua scripts to use. I have temporarily commented out all the ipc.setdisplay() commands from the scripts. This is not an ideal solution, but better than what I had. And if you ever find a way to have more than one window active at a time, that would be great! I really miss having that capability. Thanks very much for your efforts with this difficult display issue. Al
  11. ark1320

    P3Dv4 Display Help Needed

    Pete, Another problem related to the issue of display in P3Dv4 as described above: After reinstalling P3Dv4 and FSUIPC5 (after a Win10 update caused problems), I not getting any Lua script displays at all on the screen (not the green bar or the simconnect message window) even though the Lua scripts are running . For example, I have a script that moves an aircraft after asking the user to input information like new heading, distance to move, etc, using the ipc.ask() function. Even though there is no display as expected as a result of the ipc.ask() functions, the aircraft does move as expected based on the inputs I provide "in the blind". And these scripts have all been used in FSX for a long time. I had the exact same problem the first time I installed P3Dv4 and FSUIPC5 and after a day of struggles the problem went away but I don't know why ( have not been so lucky this time). The issue seems to have to do with somehow initializing the simconnect message window location and size in order to get a display on the screen. Al
  12. Hi Pete, Many of my Lua scripts make extensive use of the setowndisplay() command and now that this command does not work in P3Dv4 as it previously did, I am trying to find alternatives to the extent possible. As a first step I'm trying to understand how the ipc.setdisplay() command works with the 'common use' P3D4 simconnect message display window. When I run the small test script below with a keystroke, the display window is not in the location or the size that I expect. I understand ipc.setdisplay parameters are percentages relative to a display window, but what window? Do the percentages apply to the previous window even after it has been closed? Do I perhaps need to somehow reset the P3D4 simconnect display window location and size (e.g., to 'full screen size') before setting it to the size I need? Clearly there is something basic I don't understand about initializing and controlling the common simconnect message window location and size. In addition, when I ran the script below I got the 'dual' display (green bar and the little simconnect msg window) shown below as expected. But if I comment out the ipc.writeSTR() and ipc.writeSW() lines, I get no display at all. It is as if the green bar string display is also triggering the simconnect msg window display somehow. Without that trigger there is no simconnect window display. Also note the ipc.getdisplay() returns a sy window size of 50 vs 60 for some reason. If I change the simconnect location parameters from 100, 100 to 50, 50, the little display window moves about an inch to the left and an inch up on the screen. Test script: ipc.setdisplay (100, 100, 40, 60) ipc.display ("TEST") state, x,y, sx, sy = ipc.getdisplay() ipc.writeSTR(0x3380, state..x..y..sx..sy) ipc.writeSW(0x32FA, 10) ipc.sleep (10000) ipc.display ("") return Thanks for your help, Al FSUIPC 5.14 Win10, P3Dv4.3 Edited with new information
  13. Landing_Params is a Lua script for FSX/P3D that displays landing parameters in a small text window that pops up after the aircraft has landed and has slowed to taxi speed. The script should be activated with a key or button (like the gear down key/button) during the approach to landing. Parameters displayed in the window at touchdown are Indicated Airspeed (IAS, Kts), Ground Speed (GS, Kts), Landing Distance (LD, ft), Landing Roll (LR, ft), Vertical Speed (VS, ft/min), Attitude Indicator pitch at touchdown (AI), and Bounce Count (BC). Data collection begins when the a/c passes through a radar altimeter determined threshold altitude window between 45 and 55 ft (i.e., the nominal 50ft threshold height). In addition, more detailed landing parameter information may also be logged. May not display correctly with P3Dv4 due to Lua display limitations. Documentation included. Landing ParamsFiles.zip
  14. Approach CallOuts consists of two Lua scripts and a sound folder with wav files that work together to provide altitude, gear and flap settings, and approach minimums (Decision Height) audio callouts on an approach to landing. The altitude callouts are at Radio Altimeter (RA) heights of 2000, 1000, 500, 400, 300, 200, 100, 50, 40, 30, 20, and 10 ft. At 800ft RA (a user settable value) you get a callout of current flap and gear positions. There is no gear callout if the aircraft has a fixed gear. The minimums callout may be based on a RA or BARO (MSL) altitude. May not display correctly with P3Dv4 due to Lua display limitations. Documentation included. ApproachCallOut2Files.zip
×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.