Jump to content
The simFlight Network Forums

ark1320

Members
  • Content Count

    202
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by ark1320

  1. I now have a new update! It seems HIDMacros WILL work with the latest version of P3D4.5 (which includes HF2 I assume) if you make sure to run HIDMacros in Administrative mode. I discovered this after spending most of the day trying some other more complicated SimConnect file approaches that have worked for others to get HIDmacros to work with P3Dv4. Maybe Lockheed Martin made some changes in the latest P3D update ? Al
  2. To update and close the loop a bit for anyone else who tries HIDmacros, it turns out it does work pretty much as expected with FSUIPC in FSX. However, I have NOT been able to get it to work in P3Dv4.5 which was the sim I was initially trying it in. Al
  3. Unfortunately, I have not been able to get HIDmacros to send an altered keystroke to FSUIPC. For example, I can get HIDmacros to send the n key when the A key is pushed on the 2nd keyboard, but although Win10 does get the altered keystroke (n), FSUIPC grabs the original key (A). Al UPDATE 23Oct19: HIDmacros does seem to work with FSUIPC in FSX, but NOT in P3Dv4.5.
  4. Reinhard, John, Thanks very much for the info! I played with HIDmacros a bit. One thing I discovered is it initially seems FSUIPC grabs (traps) a key stroke before HIDmacros does, which presents some problems because, if I understand it correctly, FSUIPC either 'takes some action' based on the key if it has been assigned, or passes it directly on to the sim (P3Dv4.5 in this case). So neither FSUIPC or the sim sees the result of the HIDmacro modification. I will keep experimenting a bit. Al Edit: Now, if a future version of FSUIPC could distinguish between two keyboards/keypads that would be VERY useful indeed! 😉
  5. OK, thanks John. I was hoping it might be possible to make use of the Vendor and Product ID info that a USB HID device provides in order to distinguish between two different keyboards, or between a keyboard that includes a numberpad and a separate external numberpad, especially if the devices were from different manufacturers. Al
  6. I'd like to use two keyboards to increase the available key control inputs without having to use key combinations. Is there a way, perhaps using Lua scripts, to distinguish the inputs from the two keyboards? Thx, Al
  7. 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
  8. 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
  9. Yes, I understand. I'm familiar with negative number representation. Thanks, Al
  10. 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
  11. Ah, it was the single line vs multi-line difference that I didn't understand. Thanks very much for clearing that up. Al
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. Pete -- thanks very much for the detailed answer. Al
  21. Hi Pete, Is my understanding below correct? If a key assignment is made using Lua ScriptName under the FSUIPC Key assignments tab, then when that key is pressed the Lua file ScriptName is loaded and run. In contrast to this, if a key assignment is made using LuaToggle ScriptName along with a Parameter field entry (flag number), then when the key is pressed the associated flag value is toggled, but that is all, the script ScriptName is not loaded and run at that point due to the key stroke. So if ScriptName is to detect and process the changed flag value, [e.g., by using event.flag( ) ], ScriptName must of previously been loaded and run such as by listing it under an [Auto] section in the FSUIPC.ini file. Thanks, Al
  22. Hi Pete, Is it correct to say that each Lua plug-in has its own set of 256 flags to be independently manipulated and tested? BTW, there seems to be a minor typo in the event.flag() documentation: "If no flag number (0 – 256 255) is provided, any of the 256 changing will trigger the event. Otherwise only the selected flag will do so." Thx, Al
  23. OK, I see. And if the only condition you were trying to detect was a change in the offset value, rather then a particular offset value, you would need to identify the first call to the function associated with event.offset() and handle that as a special case. Thx, Al
×
×
  • Create New...

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.