About simFlight - simflight.com - simflight.de - simflight.fr - simflight.nl - simflight.pt - simflight.es - simflight.it - simflight.jp - simrussia.com - simMarket
Switch for flight replay
#1
Posted 13 February 2012 - 08:56 AM
I would like to have a push switch on my panel that, when pressed, will play/do an instant replay of the flight I have just completed. I have an idea that mouse macros could do the trick, but am lost on how to do this.
Any ideas, solutions
#2
Posted 13 February 2012 - 10:45 AM
Robin Meyerowitz, on 13 February 2012 - 08:56 AM, said:
No, mouse macros are macros generated to directly activate buttons or switches on an aircraft panel which normally need a mouse click to operate. They only work when the panel or gauge is written in a special way, and they have nothing to do with any other FS functions.
I'm afraid there are no control functions to do what you want apart from those involving visiting the menu entries. You could, however, use a Lua plug-in to operate that menu for you pretty smoothly. Try this (this is for FSX. Not sure if the key presses needed are the same in FS9 -- you'd need to check):
ipc.keypressplus(79,16,4) --Send ALT+O for Options menu, focus to FS ipc.keypressplus(82,8) -- Send R to select the Replay dialogue ipc.keypressplus(13,8,8) -- Send Enter to confirm and exit back to FS, returning focus
Save this to your FS Modules folder as, say, Playback.lua, then load up FS, go to FSUIPC's button assignments and assign your push switch to "lua playback".
You could easily extend the above to preset the numbers in the dialogue. Just more keypresses before that last one sending Enter. You'd need to send the numbers, and Tabs between each field and to get the focus back to the OK button for the Enter to work. KeyPress codes are listed in the Advanced User's guide, around page 23 or so (I'm looking at an older one).
Regards
Pete
#3
Posted 13 February 2012 - 10:54 AM
#4
Posted 13 February 2012 - 11:18 AM
Robin Meyerowitz, on 13 February 2012 - 10:54 AM, said:
Just looked at FS9, and the keys are the same.
Where's the challenge? Save the file, assign the key. Job done.
I think FS remembers the playback length from last time you used it, so just preset it to what you want. The only use of editing the numbers via Lua would be if you wanted a different button for different lengths.
Pete
#5
Posted 13 February 2012 - 11:35 AM
I can only say to all,read the manuals, over & over. It's all in there!
Thanks again.
#6
Posted 16 February 2012 - 11:20 AM
#7
Posted 17 February 2012 - 04:43 PM
ipc.keypressplus(79,16,4)--Send ALT+O for Options Menu
ipc.keypressplus(69,8)--Send E for Settings Menu
ipc.keypressplus(71,8)--Send G for General Menu
ipc.keypressplus(84,8)--Send T for Tool Tips
ipc.keypressplus(13,8,8)--Send Enter to Confirm and Exit back to FS
The first and last lines are from your example.
It works but after a few times FS just closes. No Errors nothing just gone.
I'm using XP SP2 FS9.1 FSUIPC 3.988F (I know its not the lastest)
I also used the Pause/Break key which does nothing in FS.
This works fine if it's programmed on a mouse button using the mouse software.
#8
Posted 17 February 2012 - 06:10 PM
Dijon76, on 17 February 2012 - 04:43 PM, said:
3.988f? I don't think I released one of those. 3.988 was May 2010 and 3.989 replaced it in June 2010. both are very old especially with respect to Lua developments.
Please update. The oldest supported release now is 3.999. I've tested your plug-in here with that and FS9.1 and it works everytime -- I even repeated it over 20 times, fast and slow. No sign of any problem.
Quote
What mouse software? If you have the facility you want, why are you changing it?
Regards
Pete
#9
Posted 17 February 2012 - 07:28 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











