Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi there,

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

Posted

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.

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

[/CODE]

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

Posted

Thanks, Pete, Never done lua's before so this could be quite a challenge. I should have said it's FS9, but will (try) have fun with this.

Posted

Thanks, Pete, Never done lua's before so this could be quite a challenge. I should have said it's FS9, but will (try) have fun with this.

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

Posted

Thanks, Pete, will let you know how things go. This is for a two seater jet that we've done for our VA. Rear seater is the instructor position. Was quite fun setting up switches in the back that duplicates switches in the front. All working with no problems at all.

I can only say to all,read the manuals, over & over. It's all in there!

Thanks again.

Posted

Pete After seeing this post I tried the following to toggle cockpit tool tips without going into the menus.

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.

Posted

I'm using XP SP2 FS9.1 FSUIPC 3.988F (I know its not the lastest)

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.

This works fine if it's programmed on a mouse button using the mouse software.

What mouse software? If you have the facility you want, why are you changing it?

Regards

Pete

Posted

Did upgrade to 3.999 right after posting. Will try plug-in again. I use Microsoft Intellipoint Mouse but I just wanted to try LUA. My last FSUIPC Version was 3.998f

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.