August 5, 20187 yr Hi, The program has really been working well for me but there's one issue that has me baffled. I'm running FSX:SE with FSUIPC and of course Chaseplane. The PageUp and the PageDown key work as expected when used from the keyboard. However, when run from a lua script the PageUp command - ipc.keypressplus(33,8) - will trigger a view assigned to the NumberPad9 key on the first time the command is send and then will work correctly on any following ipc.keypressplus(33,8) commands. If no view is programmed on the NumberPad9 key then the PageUp function doesn't work at all. The PageUp, PageDown and NumberPad9 keys are only assigned in ChasePlane and not in in FSX or FSUIPC. Also the PageDown key doesn't have this problem.
August 6, 20187 yr Commercial Member This sounds more like an issue with the script... Have you tried in other software to see if they react the same? Keven Menard Technical Director, //42.
August 6, 20187 yr Author The code behaves correctly if Chaseplane is not running or if I move the focus to a different window. With Chaseplane running whenever I move the focus back to FSX on the first time through the loop the view changes to the view assigned to the number 9 on the number keypad. After the next time through the loop the viewpoint moves down as programmed unless i switch to a different view in which case the next time through the loop the view switches back to the assigned view. I wrote the following test code: i = 0 while i<10 do ipc.keypress(33) --33 is the keycode for PageUp ipc.sleep(1000) --1 sec delay between keypresses ipc.keypress(34) --34 is the keycode for PageDown ipc.sleep(1000) i = i + 1 end If the number 9 on the keypad is not assigned to any view then when running the code the PageDown key-press is completely ignored and the viewpoint only moves up. The number 9 on the number keypad is also a PageUp key with numlk off. Could the problem lie there?
August 6, 20187 yr Commercial Member I know NumLock is related to that issue as I've seen it happen in FSX/P3D before where the controls would get all messed up when NumLock is toggled. When running your script, is NL enabled or disabled? Keven Menard Technical Director, //42.
August 6, 20187 yr Author It doesn't make a difference, it doesn't work either way. So for now I'll just assign a different key for the Move Up control in CP. Just that the PageUp key is the more natural key for the job. Thanks for your input.
Archived
This topic is now archived and is closed to further replies.