ark1320 Posted July 10, 2016 Report Posted July 10, 2016 Hi Pete, In an attempt to simulate a mouse click with a key stroke, in the FSUIPC Key Press tab I activate a Lua script with an ipcPARAM of 0 on the key downstroke, and then call the same Lua script with an ipcPARAM of 1 on key release. The Lua script tests the value of ipcPARAM to determine what action to take. I’m not getting the results I expect, especially if the key down is held a bit longer than usual (like holding a mouse button down) and wonder if there are some inherent timing issues that may be the problem since the same script is called both on key down and key release. I have tried this with No repeats! both checked and unchecked in the FSUIPC Key Press tab. Thx, Al
Pete Dowson Posted July 11, 2016 Report Posted July 11, 2016 I need more information really. For example, what's the difference betrween what you expect and what you get? Have you tried using any of the Logging to see what is happening? It would also help if you pasted your Lua script into your message, as I've no idea what it looks like. By invoking it each time you are loading and recompiling the source for each press and release. Not that this takes as long as your press, but still. It is inefficient. And FSUIPC will impose a delay before reinvoking the same plugin if the current one is still closing and freeing resources. You could see if that is causing your problem, whatever it is, by making two copies, one each handling the separate event (press or release). BTW a much better and more efficient technique for plug-ins would be to use Events -- have the plug-in loading automatically at the start, then just program your keystrokes to send it parameters, or more simply having it detect the keypresses itself using key events, saving you even the assignments. Pete
ark1320 Posted July 12, 2016 Author Report Posted July 12, 2016 Pete, Thanks for the ideas to try. Al
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now