Jump to content
The simFlight Network Forums

How to capture mouse clicks using FSUIPC?


Recommended Posts

First of all - is it even possible?

I'd like to capture non-standard control change. An example: APU switch or FMC in Embraer 190 by Wilco. I would like only to capture it, then transfer to second machine and input to FS. All in FS2004.

Maybe there is somekind of offset responsible for user inputs in FS2004?

Thanks in advance,

Robert.

Link to comment
Share on other sites

First of all - is it even possible?

FSUIPC does not monitor the mouse.

I'd like to capture non-standard control change. An example: APU switch or FMC in Embraer 190 by Wilco. I would like only to capture it, then transfer to second machine and input to FS. All in FS2004.

If the APU switch in an add-on aircraft is implemented in a way you can read it and set it by programme, yes, you can do it. But I don't know the aircraft. If it uses FSUIPC offsets for all of its added switches and controls then, indeed, it should be possible. But you'd need information about how they've done it. Maybe Wilco provide an SDK? I know that for some Wilco or Level D aircraft Nico Kaan made a driver which interfaced to FSUIPC. Perhaps you could check in that direction.

The other possibility, which is more likely if they use XML to build their gauges, is that the states are stored in "L:Vars", which can be read and written vis Lua plug-ins to FSUIPC.

Maybe there is somekind of offset responsible for user inputs in FS2004?

For almost everything implemented inside FS itself you can find ways via FSUIPC - see the documentation provided in the FSUIPC SDK. However, add-on aircraft often have their own subsystems implemented erntirely weithin their own code. Whether you can access that or not is an entirely different matter.

Regards

Pete

Link to comment
Share on other sites

It cheered me up it is possible. Maybe you are able to point me to some examples, tutorials or whatever that could help me with getting started.

Also another question: is it possible to generate mouse macro without keyboard shortcut? When I create mouse macro there is somekind of offset. Maybe it's possible for you to add option to run it via FSUIPC?

Regards,

Robert.

Link to comment
Share on other sites

It cheered me up it is possible. Maybe you are able to point me to some examples, tutorials or whatever that could help me with getting started.

The User Contributions subforum has some practical examples with real add-on aircraft, sadly not the one you are interested in at present. But perhaps they will help. And once you've solved your problems perhaps you you post your solutions there too?

Also another question: is it possible to generate mouse macro without keyboard shortcut?

Sorry, I don't quite know what you mean. What "keyboard shortcut"? Mouse macros can be used from buttons, keypresses, programs or plug-ins, just like any other macro or control.

Maybe it's possible for you to add option to run it via FSUIPC?

If you mean execute a macro or Lua plug-in via the FSUIPC programmable interface, then of course it is possible. It is done via offset 0D70, as documented. You can also execute macros from a Lua plug-in using the ipc.macro function, also in the documentation.

Other ways exist too, like having a program or Lua plug-in use a virtual button in the offsets 3340 (and following), then programming that button in FSUIPC's assignments to execute the macro. That gives you a little more flexibility for different aircraft, as FSUIPC can switch assignments according to aircraft loaded. You could of course read the aircraft name and do that switching in an external program or Lua plug-in, but it starts getting rather complicated the more aircraft you want to handle that way.

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.