Jump to content


Simulate normal mouse clicks?


  • Please log in to reply
4 replies to this topic

#1 Firefly

Firefly

    Newbie

  • new Members
  • Pip
  • 3 posts
  • LocationNorway

Posted 22 February 2012 - 09:39 AM

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

#2 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 22192 posts
  • LocationNear Stoke-on-Trent, UK

Posted 22 February 2012 - 01:09 PM

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

View PostFirefly, on 22 February 2012 - 09:39 AM, said:

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.

Quote

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

#3 Firefly

Firefly

    Newbie

  • new Members
  • Pip
  • 3 posts
  • LocationNorway

Posted 22 February 2012 - 10:09 PM

View PostPete Dowson, on 22 February 2012 - 01:09 PM, said:

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...!

View PostPete Dowson, on 22 February 2012 - 01:09 PM, said:

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!!)

View PostPete Dowson, on 22 February 2012 - 01:09 PM, said:

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.

View PostPete Dowson, on 22 February 2012 - 01:09 PM, said:

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

#4 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 22192 posts
  • LocationNear Stoke-on-Trent, UK

Posted 23 February 2012 - 12:26 AM

View PostFirefly, on 22 February 2012 - 10:09 PM, said:

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. :-(

Quote

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.

Quote

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

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

Quote

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

#5 Pete Dowson

Pete Dowson

    Advanced Member

  • Moderators
  • 22192 posts
  • LocationNear Stoke-on-Trent, UK

Posted 27 February 2012 - 02:33 PM

View PostPete Dowson, on 23 February 2012 - 12:26 AM, said:

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


About simFlight - simflight.com - simflight.de - simflight.fr - simflight.nl - simflight.pt - simflight.es - simflight.it - simflight.jp - simrussia.com - simMarket