codatcri Posted May 24, 2022 Report Posted May 24, 2022 Hello, i have a lua script assigned to a button in order that when i press it in the relative instrument windows it presses the button to switch between OAT/volts. Everything is working fine when i have the mouse pointer, let's say, active with the arrow visible. If I wait a few seconds the arrow disappear (I think it'a a normal behaviour of MSFS. In this condition the script doesn't work at all. how can i do to make the mouse pointer active with the script? currently the two lines are: mouse.move(1566,204) mouse.click(0) Thanks fot help. CC
John Dowson Posted May 25, 2022 Report Posted May 25, 2022 14 hours ago, codatcri said: If I wait a few seconds the arrow disappear (I think it'a a normal behaviour of MSFS. In this condition the script doesn't work at all. how can i do to make the mouse pointer active with the script? I don't think this is currently possible I'm afraid...I can/will look into this (it will take a while before I have time) but cannot guarantee that I can do anything about this. Have you looked into other more direct methods of controlling this, such as using lvars, hvars or presets (assuming no standard controls are available)? This would be more reliable, if anything exists. Try looking at the HubHop preset list (https://hubhop.mobiflight.com/presets/) to see if anything is available. If you let me know what aircraft you are using I can also take a look. John
codatcri Posted May 26, 2022 Author Report Posted May 26, 2022 Thanks John, The aircraft was Diamond DV20. The thing is this script used to work some MSFS updates ago....and with other instruments not controllable through other direct methods. I'm pretty sure before this fading of the mouse arrow thing.. I had a look to hubpop site but can you suggest any documentation on how to use/install those presets? I'll try also with lvar.. will see. Cristiano
John Dowson Posted May 27, 2022 Report Posted May 27, 2022 10 hours ago, codatcri said: I had a look to hubpop site but can you suggest any documentation on how to use/install those presets? They come with FSUIPC7 and are directly assignable from the controls drop-down menus (prefixed by 'Preset'). Make sure you are using the latest version (v7.3.3) and have the WASM installed and enabled. You can enable it from the Add-ons->WASM menu item (you only need to do this once). Once enabled, disconnect and re-connect to MSFS (if it is running) or restart FSUIPC7. Documentation on using presets. lvars & hvars is included in the WASM section in the Advanced User guide. 10 hours ago, codatcri said: I'm pretty sure before this fading of the mouse arrow thing.. Yes, most probably. Check to see if there is an MSFS option to prevent this. i did take a quick look to see if there is anything I can do about this (e.g. a windows call to return the pointer visibility), but I couldn't see anything that looked suitable. I can take another look when I get more time.
codatcri Posted May 27, 2022 Author Report Posted May 27, 2022 i tried a double line mouse movement also in combination with a double click next to the button position in order to"reactivate" the mouse arrow before the actual command but nothing. waiting whh i'll have time. thanks for now
John Dowson Posted May 27, 2022 Report Posted May 27, 2022 I will look to see if I can add anything to help with this in a couple of weeks or so...I will let you know. I'm not too familiar with the windows API for mouse control so I need to investigate...I will report back if/when I find anything. John
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