Jump to content
The simFlight Network Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


ark1320 last won the day on January 10

ark1320 had the most liked content!

Community Reputation

10 Good

About ark1320

  • Rank
    Advanced Member

Profile Information

  • Gender
  • Location
    Colorado, USA

Recent Profile Visitors

2,047 profile views
  1. Based on my experience with others sims, if the aircraft developer does not provide the needed key bindings, using FSUIPC to manipulate controls that are very specific (or unique) to a particular aircraft usually requires access to the associated sim Lvars (Local variables). Currently FSUIPC7 does not have access to MSFS Lvars so I think you may be stuck with operating these controls with the mouse, at least for now. Al
  2. Just info for anyone who might be interested, I have found Offset 0x132C [NAV/GPS Switch or GPS Drives Nav1] works for reading and writing. Using this offset I am able to switch between GPS and VLOC (NAV) modes for default aircraft using the G3000 (with and without mods), the G1000 (with and without mods) and the GNS 530/430. Al
  3. That explains the script behavior I observed - thank you. Al
  4. I have noticed that activating log Lua Plugins with FSUIPC7 has a major impact on how quickly MSFS responds to a key input that triggers a Lua script. I have a Lua script that records the ipcPARAM value each time the script is called. The script is called by each of the numberpad num keys such that if called by the 4 key, it records the ipcPARAM value of 4, if called by the 2 key it records the ipcPARAM value of 2, etc. If the script is called when Lua Plugins logging is off I can 'enter' a data value like 245 by calling the script 3 times with the numberpad 2, 4, and 5 keys, and I can do this
  5. John -- does the latest FSUIPC6 version have the event.cancel() bug? I'm asking because I want to use event.key() functions in a pause script for both MSFS and P3Dver4.5/5.1. Al
  6. The SetPauseMSFS&P3D.lua script attached below makes use of the FSUIPC Lua event and wnd libraries (as suggested by John Dowson) and can be used to pause MSFS or P3Dv4.5/v5.1 from 1 minute to days after the script is run. When run, the script asks for a pause time and if none if provided within two minutes the script closes with a brief message. If a pause time is entered, for example 260 minutes until a Top of Descent, the user would see Then after hitting the Enter key the display would change to This display will change once per minute as the time to pause count
  7. The files ask_for_num() and get_asked_num() attached below are versions of the files ask_for_data() and get_asked_data() (post above) but only work for purely numerical values -- no letters -- and as a result there is less delay in detecting an input since each time called get_asked_num() does not require establishing events for all the lowercase and uppercase letters. Al ask_for_num_function_def.lua get_asked_num.lua
  8. Below is a brief example of how to do what John has suggest above. Note however that this example uses the files ask_for_num() and get_asked_num() which are attached below. These are versions of the files ask_for_data() and get_asked_data() but don't work for letter characters, and as a result there is less delay in detecting an input since each time called get_asked_num() does not require establishing events for all the lowercase and uppercase letters. Using ask_for_data() and get_asked_data() would also work of course. Script get_asked_num() goes in the same folder as FSUIPC7.ini. Note
  9. I have a number of Lua scripts that make good use of ipc.ask(). Unfortunately, ipc.ask() does not work reliably in MSFS due to current limitations of the SDK. So with the significant help of Pete and John Dowson I developed the two attached Lua scirpts that work together to provide a temporary (hopefully) alternative to ipc.ask(). The ask_for_data_function_definition is a function that when invoked by an instruction asking for data in your main Lua script, in turn runs the get_asked_data.lua script that must be in the same folder with FSUIPC7.ini. The get_asked_data.lua script returns th
  10. Sorry, my fault, let me try to be clearer. I have rewritten the TOD pause script. When run it first displays an "Enter time to TOD" message in the wnd window and a data entry event.timer() starts which gives the user 2 minutes in which to enter the desired time until TOD pause. If there is no entry within the time limit the script closes with a timeout message. If a TOD time is entered successfully, a TOD event.timer() is started which, as I understand it, will automatically cancel the data entry event timer. A TOD Pending message is displayed until the TOD event timer times out and the
  11. With the "ask" substitute the reply happens as soon as the data is entered assuming the data is followed by the required Enter key, so it seems a simple 'one-time' timeout check at the end of the allowed data entry time will work fine. (Edit: I see John just said the same above) With the current TOD pause script I check the time every 10 sec using a timing loop based on ipc.sleep(10000). I thought 10 sec was plenty accurate even for short times while not putting any significant load on the PC. But, based on your event.timer info (25 days, WOW!) , I might as well do away wit
  12. Great - thanks. The get_asked_data.lua script uses ipc.exit() to cancel all the pending events since the script ends when the data is entered, but the TOD_PauseMSFS.lua script mentioned above will make good use of the event.cancel() fix since the script may run for hours (until TOD) after the TOD time is entered. So can't use ipc.exit() to cancel events. I would like to clarify something about the mytimer() function in your original askTest.lua script. function mytimer(time) closeafter = closeafter - 500 if closeafter <= 0 then
  13. Sure -- be glad to do a brief writeup and put the 'ask' scripts into the Contributions section. I also have a TOD_PauseMSFS.lua that will pause MSFS at a user set Top of Descent time that makes use of your basic script, so will also put that into the Contribution section. Al
  14. I now generate events for both the upper and lower case letter keys j= 65 while j <= 90 do event.key(j, 0, "keyPressed") -- Lower case letters a to z event.key(j, 1, "keyPressed") -- Upper case letters A to Z j = j + 1 end and process the keycodes like this: if keycode >= 65 and keycode <= 90 then -- convert keycodes to char codes charcode = keycode + (1 - shifts)*32 -- convert keycode to lower case if shifts = 0 by adding 32 to
  15. OK, I think I get it now; event.key() only works with virtual key codes, and there doesn't seem to be any virtual key codes for lower case letters in the list in the Advanced User's Guide. I guess my thinking (or lack thereof) was skewed by my experience with ipc.ask() which works with both upper and lower case letters, etc. Sorry for my confusion on this. Thanks, 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.