Jump to content
The simFlight Network Forums

ark1320

Members
  • Posts

    603
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by ark1320

  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 at a 'normal' typing rate. However, if log Lua Plugins is on, I have to pause for a few seconds between number key inputs (i.e., between successive calls of the script) or else the inputs (ipcPARAM values) are 'missed' for some reason -- perhaps the script does not have time to complete between calls because of an initial logging delay. What is particularly strange, however, is that if Log Lua Separately is on, I can again enter data (repeatedly call the script) at the normal rate -- no inputs (ipcPARAM values) are missed. So it seems something is significantly different in the logging process between logging Lua Plugins and Log Lua Separately, at least on my system. I don't know if this logging induced delay 'issue' is unique to my system for some reason, or is to be expected when logging Lua Plugins is on, or what. I'm just making what I observed known since I spent a considerable amount of time trying to figure out why I was having certain number entry problems when another user with the exact same plugin was not. It turned out I had log Lua Plugins on, and he didn't. So just FYI. Al
  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 counts down towards zero. If the user decides to cancel the pending (future) pause with the Enter key, the display briefly changes to When the pause time is reached, the sim pauses and looks just like a pause had been initiated with the ESC key. To cancel a paused sim you just need to click on Resume. This script uses the wnd (Window ) library for display, so you can move the display window with the arrow keys and use the ctrl + arrow keys to resize the window. The window must have the focus to do this. The new window display position will be stored in your FSUIPC .ini file. As an alternative to using the arrow keys you can directly edit the window position and size coordinates in the FSUIPC7.ini file. Look for the entry under [ExtWindow]. It seems best to do this when FSUIPC7 is not running. You may also have to edit the window size and position in the lua file. The script requires a registered copy of FSUIPC. If using MSFS, at least FSUIPC7 version 7.0.4 is required, or at least FSUIPC6 version 6.0.12 for P3D. Al SetPauseMSFS&P3D.lua
  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 that whether using ask_for _data() or ask_for_num() you will have to edit the function definition to insert the path to your Lua files location. Al -- Get_CRS&HDG.lua function ask_for_num(request_string) -- use for number only data ipc.set("NUM_REQUEST", request_string) ipc.set("NUM_ANSWER", request_string) ipc.runlua("C:\\Users\\... your path to Lua files...\\get_asked_num.lua") -- enter your path here repeat num_returned = ipc.get("NUM_ANSWER") ipc.sleep (100) until num_returned ~= request_string return num_returned end -- Example Main Program while true do CRS1 = ask_for_num("Enter 3 Digits for Course ") if CRS1 == "*" then -- * is error char ipc.sleep(100) else break end end ipc.writeUW(0x0C4E,CRS1 ) while true do HDG = ask_for_num("Enter 3 Digits for Heading ") if HDG == "*" then -- * is error char ipc.sleep(100) else break end end HDG = math.floor(HDG*65536/360) -- format for FSUIPC, no decimal places ipc.writeUW(0x07CC,HDG ) ask_for_num_function_def.lua get_asked_num.lua
  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 the requested data or an * (asterisk) indicating an error. Perhaps this is best explained by example. If you had a script that would normally use ipc.ask() it might look like this: -- Your Program code ........... alt = ipc.ask( "Enter the new desired altitude") ......... gs = ipc.ask("Enter ground speed") ........ -- end of Your Program code With the alternative to ipc.ask we have this. -- ask_for_data_ function function ask_for_data(request_string) ipc.set("DATA_REQUEST", request_string) ipc.set("DATA_ANSWER", request_string) ipc.runlua("C:\\Users\\..... insert path to your Lua scripts....\\get_asked_data.lua") --note Lua syntax requires the use of the double back slashes. repeat data_returned = ipc.get("DATA_ANSWER") ipc.sleep (100) until data_returned ~= request_string return data_returned end -- Your Program code ........... alt = ask_for_data( "Enter the new desired altitude") --ipc.ask() alternative function call ......... gs = ask_for_data("Enter ground speed") --ipc.ask() alternative function call ........ -- end of Your Program code So the major change is the ask_for_data(request_string) function has been added to the original program code. When the application program gets to an ask_for_data() request, the user has 2 minutes to provide the data (followed by the Enter key) or an * is returned to signal a data request timeout error has occurred. The returned data string can consists of upper and lower case letters, numbers, space, and Numberpad characters with NumLock on. At the beginning of the main ask_for_data code is the variable error_string, currently set to "*". If the asterisk is a valid value in your application, you can change this, e.g., error_string = "!ERR!", etc., that better fits your application. Whatever you use, you probably would want to test for it in your application. The data timeout time is set by the variable data_entry_time, also located at the top of the main get_asked_data code, and so can be easily changed as well. Once a request for data window is displayed, there is a slight delay (as second or two) before a key stroke will be recognized. I think this delay is caused by the time it takes the ask_for_data() script to establish all the key detection events each time it is run. Edit: See post below if only using purely numerical data. Al ask_for_data _function_def.lua get_asked_data.lua
  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 called timer function pauses the sim. As for cancelling a pending pause, I've changed things so once a TOD pause is pending, hitting Enter exits the script thus cancelling the pending pause. I wanted to ask if I am correct that rerunning a running script automatically cancels all the events in the first instance of the script? Best, Al
  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 with the timing loop and just use a "one time check" timer like event.timer(TODtime, "pause_sim"). As I understand it, this TOD event timer will replace the event.timer() used to get the TOD pause time value from the user since you can have only one event timer active at a time per Lua script. Pending (future) TOD pauses can be cancelled by simply rerunning the script -- i.e, the script works in a toggle TOD pause on - TOD Pause off manner. Thanks for the timer info, Al
  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 wnd.close(w) w = 0 event.cancel("mytimer") ............. event.cancel("keyPressed") ipc.log("No number entered: timed-out") end end My understanding is you use event.timer(500, "mytimer") to call this function every 500 ms (milliseconds) to check if data has been entered within the allowed time period of 3600000 ms or 60 minutes, and if not all events are cancelled. My question is, if in a request for data application we were to set the allowed time for data entry to a much smaller time, say 5 minutes (300000 ms) could we just use a 5 minute interval, e.g. event.timer(300000, "mytimer')? What I'm asking is why check repeatedly if data has been entered instead of just checking once at the end of the total allowed data entry time? Does this perhaps have something to do with the max allowed value for the interval in ms? Thanks, Al
  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 keycode, shifts = 1 for uppercase elseif keycode >= 96 and keycode <= 105 then -- for Num0 to Num9 charcode = keycode - 48 elseif keycode >= 106 and keycode <= 111 then -- Numpad * + - . and / (note there is no 108 keycode) charcode = keycode - 64 else charcode = keycode end enteredText = enteredText .. string.char(charcode) -- else display next char entered With this I get upper and lower case letters and all Numpad key working as I expected. I now better understand the difference between key codes which refer to a physical key on the keyboard, and char codes which represent an ASCII character. I updated the script code posted above and also attached it here along with the calling function in case anyone might be interested. Best, and many thanks, Al ask_for_data _function_definition.lua get_asked_data.lua
  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
  16. Pete, I don't know why with the script above the numberpad keys, with numlock on, are returned and displaying incorrectly, e.g., num1 to num9 display as the lower case letters a to i. I am using the keycodes per the table in the Advanced Users guide. There was some issue, now resolved I believe, with FSUIPC7 getting wrong numpad key codes through SimConnect, and John provided some kind of temporary work-around. I also don't understand why with the script above keys a to z display as UPPER case using keycodes 65-90 since I'm not using the Shift option in event.key(). Maybe that is just how wnd.text() works? The little file attached which displays the keycode of a pressed key shows the lower case letter keycodes as 65-90 with Shift off. If 65-90 were in fact upper case keycodes, what are the lower case keycodes for a to z? Thanks to you and John this certainly has been a useful and interesting learning experience for me. Al KeyCodes3.exe
  17. Pete, Here is a version of the above "events" lua script that on one hand is more compact code-wise and on the other was expanded to include letters and the numpad digits. The numpad digits don't work (they actually provide the ' char and the lower case letters a - j for num0 to num9. I think this is because of what John had to do to make the numpad keys work through SimConnect. The letters do work, although they are all returned as upper case for some reason. So this script is using 47 event.key events -- what are some of the considerations regarding the practical limit on the number of events the system can monitor at one time? -- Adjust the numbers here to set your Window position and size -- (x, y, sizex, sizey), w is the window's 'handle' (identifier) local w = wnd.open("Get Num Input", WND_FIXED, 800,100,425,60) -- Window size and location wnd.show(w, WND_TOPMOST) -- keep window on top of screen -- These set the colours and font to be used. -- The size "-4" means the largest to fit 4 lines in the window wnd.backcol(w, 0x000) wnd.textcol(w, 0x6c0) wnd.font(w, WND_ARIAL,-3) -- Update the display at 500 msec intervals (see event at end) local interval = 500 -- 1/2 second local closeafter = 120000 -- 2 minutes to provide data before timeout local enteredText = "" -- init enteredText by user to nothing (cleared) local data_request = ipc.get ("DATA_REQUEST") local displayText = data_request wnd.text(w, displayText) -- display message requesting input function mytimer(time) -- close window after 2 minutes closeafter = closeafter - 500 if closeafter <= 0 then ipc.set("DATA_ANSWER", "*") -- * indicates timed out or an error condition (see below) wnd.close(w) w = 0 ipc.exit() -- cancel all event.key events and event.timer event and exit script end end function keyPressed(keycode, shifts, downup) -- close window after CR (Enter) key and display enter text (e.g., number) if keycode == 0x0D then if enteredText == "" or enteredText == nil then enteredText = "*" -- * indicates timeout (see above) or error condition end ipc.set("DATA_ANSWER", enteredText) wnd.close(w) w = 0 ipc.exit() -- cancel all event.key events and event.timer event else -- else display next char entered 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 keycode, shifts = 1 for uppercase elseif keycode >= 96 and keycode <= 105 then -- for Num0 to Num9 charcode = keycode - 48 elseif keycode >= 106 and keycode <= 111 then -- Numpad * + - . and / (note there is no 108 keycode) charcode = keycode - 64 else charcode = keycode end enteredText = enteredText .. string.char(charcode) -- else display next char entered newDisplayText = displayText .. enteredText -- newDisplayText = original window message + user entered text wnd.clear(w) wnd.text(w, newDisplayText) end end -- Adjust timing to taste: 500 = 1/2 second event.timer(interval, "mytimer") -- call function "mytimer" every 'interval' in time -- valid data characters i = 48 while i <= 57 do -- digits 0 to 9 event.key(i , 0, "keyPressed") i = i + 1 end 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 k= 96 while k <= 111 do -- number pad keys with numlock on event.key(k , 0, "keyPressed") k = k + 1 end -- additiona virtual keycodes, see FSUIPC Advanced User's Guide pages 19-20 event.key(8, 0, "keyPressed") -- Backspace event.key(13, 0, "keyPressed") -- Enter event.key(32, 0, "keyPressed") -- space bar event.key(135, 0, "keyPressed") -- Numpad Enter key
  18. Pete -- very clever! Here's what I came up with. The definition of the calling function as an alternate to ipc.ask() is ask_num_data(request_string). I used the repeat - until because John's askTest() uses an event.timer. function ask_num_data(request_string) ipc.set("DATA_REQUEST", request_string) ipc.set("DATA_ANSWER", request_string) ipc.runlua("C:\\Users\\Al\\Documents\\....\\FSUIPC7\\Modules\\get_num_data.lua") repeat data_returned = ipc.get("DATA_ANSWER") ipc.sleep (100) until data_returned ~= request_string return data_returned end So a user would use something like this when requesting data. gs = ask_num_data(" Enter Ground Speed ") The accompanying get_num_data.lua script that is called, as you suggested, by ask_num_data(request_string) is below (the few changes I made to John's script are in purple). The script returns an * that can be tested for to indicate a timeout or error condition. It all seems to work but I'm certainly open to any suggestions. This script will get much smaller when John fixes the bug in FSUIPC7 that he mentioned so one event.cancel() below will cancel all the same pending events. Thanks for ALL the help, Al get_num_data.lua -- get_num_data.lua Script works with function call ask_num_data(request_string) as an alternate to standard ipc.ask() for getting numerical input in MSFS -- Script is a slight modification of the askTest.lua script by John Dowson -- 2Jan2021 -- Adjust the numbers here to set your Window position and size -- (x, y, sizex, sizey), w is the window's 'handle' (identifier) local w = wnd.open("Get Num Input", WND_FIXED, 800,100,425,60) -- Window size and location wnd.show(w, WND_TOPMOST) -- keep window on top of screen -- These set the colours and font to be used. -- The size "-4" means the largest to fit 4 lines in the window wnd.backcol(w, 0x000) wnd.textcol(w, 0x6c0) wnd.font(w, WND_ARIAL,-3) -- Update the display at 500 msec intervals (see event at end) local interval = 500 -- 1/2 second local closeafter = 120000 -- 2 minutes to provide data before timeout local enteredText = "" -- init enteredText by user to nothing (cleared) local data_request = ipc.get ("DATA_REQUEST") local displayText = data_request wnd.text(w, displayText) -- display message requesting input function mytimer(time) -- close window after 2 minutes closeafter = closeafter - 500 if closeafter <= 0 then ipc.set("DATA_ANSWER", "*") -- * indicates timed out or an error condition (see below) wnd.close(w) w = 0 event.cancel("mytimer") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") end end function keyPressed(keycode, shifts, downup) -- close window after CR (Enter) key and display enter text (e.g., number) if keycode == 0x0D then if enteredText == "" or enteredText == nil then enteredText = "*" -- * indicates timeout (see above) or error condition end ipc.set("DATA_ANSWER", enteredText) wnd.close(w) w = 0 event.cancel("mytimer") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") event.cancel("keyPressed") else -- else display next char entered enteredText = enteredText .. string.char(keycode) newDisplayText = displayText .. enteredText -- newDisplayText = original window message + user entered text wnd.clear(w) wnd.text(w, newDisplayText) end end -- Adjust timing to taste: 500 = 1/2 second event.timer(interval, "mytimer") -- call function "mytimer" every 'interval' in time event.key(0x30 , 0, "keyPressed") -- 0 -- call "keyPressed" function if 0 key pressed event.key(0x31 , 0, "keyPressed") -- 1 event.key(0x32 , 0, "keyPressed") -- 2 event.key(0x33 , 0, "keyPressed") -- 3 event.key(0x34 , 0, "keyPressed") -- 4 event.key(0x35 , 0, "keyPressed") -- 5 event.key(0x36 , 0, "keyPressed") -- 6 event.key(0x37 , 0, "keyPressed") --7 event.key(0x38 , 0, "keyPressed") --8 event.key(0x39 , 0, "keyPressed") --9 event.key(0x0D , 0, "keyPressed") -- return
  19. Pete, your patience is quite amazing. I think I have done a poor job of explaining what I see as the problem, or I’m not astute enough to fully understand what you are telling me, or maybe both. In any case, if the ipc.ask() function worked, I might have a main program script like this: -- main program new_alt = ipc.ask(“enter altitude”) code here to process altitude input new_hdg = ipc.ask(“enter heading”) code here to process heading input new_gs = ipc.ask(“enter ground speed”) code here to process ground speed input -- end main program What I ‘m trying to do is write a new function (not stand alone program) called get_input() that is based on John’s stand alone askTest script. This new function would be defined at the top of the program above and then I could call it in place of the three ipc.ask() functions, e.g., new_alt = get_input (“enter altitude”), etc. The challenge I have is that while each ipc.ask() function would in essence stop program execution and wait for the user to enter the requested data (followed by a return character), I can’t figure out how to make the replacement get_input() function based on John’s work do that –as a called function it executes in a ‘flash’ and returns to the main program before the user has time to enter any data. How to add that ‘wait for input feature’ that ipc.ask() has to the replacement get_input() function is what I’m struggling with. Stated more generally, the issue is how do you prevent a called function from returning to the main program until a particular character is detected if , as you explained above, you can't use 'loop' constructs (repeat-until, while-do, etc) that don't relinquish control because the called function makes use of event type operations such as event.key(). Hope that clarifies the problem as I see it. Thanks you, Al
  20. Just to clarify, I just realized that I was not quite correct above in that John's script does not use a discrete return instruction since it is not written as a function, but when a return character is detected, all events are cancelled and the program just ends. Al
  21. Yes, John's script does that and it works fine as a stand alone Lua program. It is when I try to incorporate it into the form of a function to be called from a main program, the function 'completes' before any key presses can be detected and returns to the calling program which then of course 'continues on'. You have been more than generous with your time on all this, I will continue to think about it and see what I can figure out. Many thanks, Al
  22. The standard ipc.ask() function does not return an input until a Return character is detected. With this in mind, I have been trying to rewrite John's askTest.lua script in the form of a function so it can be called from a main program when needed. What I can't figure out is how to prevent the return from the askTest() function back to the main calling program until after the Return key has been detected thus indicating the input process has been completed. Thanks for any suggestions, Al
  23. AH! That's what I didn't understand. Thank you, Pete! I will try what you have suggested. Best, Al EDIT: Now works as expected -- many thanks again!
  24. My issue here is when the counter is running, the event.key() function does not seem to work. I changed the test script to the below. The counter counts up and displays correctly, but when I press the 0 key, the count is not reset as I would expect . It seems the event.key(0x30 , 0, "ResetCount") function does not detect a 0 key press and call the ResetCount function to reset the counter. I don't understand why event.key() is not working. The 0 key is not assigned in FSUIPC7 or in MSFS, so it is not being 'trapped' as best as I can tell. I also tried detecting other number keys in this test script, none work. Thanks for any ideas, Al function ResetCount() k = 0 end -- Main program w = wnd.open("Counter test", WND_FIXED, 800,100,200,30) wnd.backcol(w, 0x000) wnd.show(w, WND_TOPMOST) wnd.textcol(w, 0x6c0) wnd.font(w, WND_ARIAL,-1) event.key(0x30 , 0, "ResetCount") -- detect 0 keypress k=0 while k <= 3600 do k = k+1 wnd.text(w, "Count = "..k) ipc.sleep(1000) end
  25. I have been trying to develop a function based on the askTest.lua script that could be called from a main program wherever numerical input was needed -- no success so far. So to make sure I understood correctly how things worked, I wrote the following little test script. I expected that once the event.key() function was executed, then if I pressed the 5 key while the k counter was counting up, the event.key function would detect the key press and the DisplayTest function would be called and Test would be briefly displayed. But as far as I can tell, nothing happens when I press the 5 key -- all I see is k continuing to count up without any interruption. Even if I disable the display of k, I get no response to pushing the 5 key. So either there is something fundamental I don't understand, or maybe it is a SimConnect text display problem? Best for the New Year! Al function DisplayTest() ipc.writeSTR(0x3380, "Test") ipc.writeSW(0x32FA, 3) ipc.sleep(3000) end -- Main program event.key(0x35 , 0, "DisplayTest") -- 5 digit k=0 while k <= 3600 do k = k+1 ipc.writeSTR(0x3380, k) ipc.writeSW(0x32FA, 1) ipc.sleep(1000) end
×
×
  • 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.