Jump to content
The simFlight Network Forums

Simulate normal mouse clicks?


Recommended Posts

Hi Pete,

Is there an API available in the Lua that comes with FSUIPC for simulating a normal left and right mouse click?

I can't find anything in the documentation, but wonder if a "simple" thing like this really isn't possible...

My goal is to be able to assign mouse clicks to buttons on my VRInsight MCP-Combo through LINDA.

(Mouse macros, Lvars etc doesn't work for the functions I need)

Allan

Link to comment
Share on other sites

You posted your support query into the User Contributions subforum. I've moved it here, to the Support Forum, for an answer.

Is there an API available in the Lua that comes with FSUIPC for simulating a normal left and right mouse click?

No. What would you use it for? You'd need to be able to move the mouse pointer to the correct place for a click to be of any use in any case, and where, exactly is "the right place" going to be?

There is a program called "Key2Mouse" which allows you to assign mouse moves and clicks to keypresses. But really, these days, this sort of thing is not often a lot of use.

My goal is to be able to assign mouse clicks to buttons on my VRInsight MCP-Combo through LINDA.

(Mouse macros, Lvars etc doesn't work for the functions I need)

What about normal FS controls or assigned keypresses in the add-on?

Are these functions the ones only operated by mouse, static -- always in the exact same place on screen? If not how would it work? If so, you could use Key2Mouse.

I could consider adding a mouse manipulation library to the Lua support but I would like good reasons and practical applications to make it worthwhile, and it is not easy to think of many.

Regards

Pete

Link to comment
Share on other sites

No. What would you use it for? You'd need to be able to move the mouse pointer to the correct place for a click to be of any use in any case, and where, exactly is "the right place" going to be?

Well, of course you would have to define the x,y coordinates in pixels for where the mouse click should happen, but that's not a problem. I have the Wilco Airbus and there are some functions I can't do any other way than using a mouse click. And if I use the same view all the time (I use Ezdok) the location of the buttons will always be the same, so it will work just fine even though its not the most desirable solution. Right now I'm using HIDmacros which can send mouse clicks but it's annoying to have FCU functions on a keyboard when I have the MCP Combo buttons that are meant for doing those functions...!

There is a program called "Key2Mouse" which allows you to assign mouse moves and clicks to keypresses. But really, these days, this sort of thing is not often a lot of use.

Well I can't use it with the MCP Combo. Also, it costs money - and quite a lot compared to what it does! The developer for the Wilco Airbus do sell an extension that gives me FSUIPC offsets - but it's RIDICULOUSLY expensive! (cost more than the full PMDG 737 NGX!!)

What about normal FS controls or assigned keypresses in the add-on?

FS controls are n/a. Mouse macros don't work. No Lvars are available. Assigned keypresses do exist but only to a key press. And the key press doesn't work for the MCP Combo with LINDA.

I could consider adding a mouse manipulation library to the Lua support but I would like good reasons and practical applications to make it worthwhile, and it is not easy to think of many.

Hmmm, to me it seems like a logical fallback option when everything else fails... Also with vasfmc some of the mouse macros don't work and I have no other option than to find the mouse, move it to the exact location, and then click. In a busy cockpit I'm sure you know how annoying that is! :)

Regards,

Allan

Link to comment
Share on other sites

I have the Wilco Airbus and there are some functions I can't do any other way than using a mouse click.

Really? I thought Wilco products were alwas fully amenable to hardware assignments. I must have thought wrong I guess. :-(

Well I can't use it with the MCP Combo.

You can program that to send keypresses as well as FS controls if you are using FSUIPC for it.

The developer for the Wilco Airbus do sell an extension that gives me FSUIPC offsets

Ah, that's what i must be thinking of.

FS controls are n/a. Mouse macros don't work. No Lvars are available. Assigned keypresses do exist but only to a key press. And the key press doesn't work for the MCP Combo with LINDA.

Really? You can assign them in FSUIPC once FSUIPC recognises the device, as it will do with the correct set up.

Anyway, I don't have time at this very moment to develop a mouse library for Lua, but I'll put it on the list. See also the thread near here about mouse look.

Regards

Pete

Link to comment
Share on other sites

Anyway, I don't have time at this very moment to develop a mouse library for Lua, but I'll put it on the list.

A Lua mouse library is now available. It is added in FSUIPC 3.999c and 4.802, obtainable from the Download Links subforum. The library is documented in the updated Lua plug-ins download.

Regards

Pete

Link to comment
Share on other sites

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.