Jump to content
The simFlight Network Forums

Mouse Macros procedure


Recommended Posts

Hi,

the mouse macro will only contain the mouse press (left single click code 3), so if you call it on a button press or release, it will still be sending the mouse (left single) click only.

What you probably want is a  left button and drag then a mouse release. Do do this, you will have to manually edit the macro file. See page 32 of the FSUIPC User Manual for the mouse action codes, and page 37 of the Advanced User Manual for 'multiple actions in one macro control'. If that doesn't work, try a few other combinations.

You could also see if there is a control or lvar you can use for this by activating logging.

Cheers,

John

P.S. If its the Aerosoft A320 you are trying to set-up, there is also a discussion on setting up the speedbrake on an axis or buttons in this (ongoing) thread that may be of interest (half way down):

 

Edited by John Dowson
Added link to related thread
Link to comment
Share on other sites

Also note that mouse macros will not work if the gauges haven't been written strictly in accordance with Microsoft's C/C++ gauge SDK and you may need to try looking into using lvars instead, if available. However, I also see this comment from 2016 on lvars - not sure if still valid:
 

Quote

If I may add my 2 cents to this, the FSL A320X LVars that have been exposed so far are of no use if the objective is to make an input to a switch or a knob control. So we would have to wait for the SDK and the associated Event ID's.

Link to comment
Share on other sites

Hi John, I tried to modify the macro file by inserting the various strings you suggested, but it does not work; that lever does not move.
I open a parenthesis: is there a difference between these two strings (example)?
1[space]=[space]sb-full-press[space]=[space]RX40000170,9
1=sb-full-press=RX40000170,9

However, I have tried them all in both formats, but they do not work under any circumstances.

On other issues (Microsoft's C / C ++ gauge SDK, lvars) I'm totally ignorant.
What I know is that I have Prepar3D v. 4.4 running on Windows 8.1 (64bit) and using the Aerosoft A320-A321 Professional.

I purchased FSUIPC with confidence and is a great product. I hope you will help me to solve this question.

Thanks.

 

Link to comment
Share on other sites

3 hours ago, Freccia said:

What I know is that I have Prepar3D v. 4.4 running on Windows 8.1 (64bit) and using the Aerosoft A320-A321 Professional.

With P3D4.4 and FSUIPC5 then the MS Gauges SDK is not relevant. The Mouse Macro facility uses additions provided by L-M in answer to one of my requests. These identify each mouse-sensitive area in a cockpit by a unique number - x40000170 in the case above.

With most buttons and switches the action recorded (the number after the comma) is just left mouse click. Others can be recorded, but sometimes the switch demands different actions -- maybe right click, or press and release, or double click, or, as John suggested, even a "drag whilst pressing". You'd know more about this -- for instance, does the switch action occur as soon as you click , or only after release? And so on.

With switches or dials which need more complex mouse actions, FSUIPC cannot really record them all for the one action.  The actions codes are listed on page 38 of the Advanced users guide to FSUIPC5. Take a look there. If the correct code, or sequence, is not clear for how you use the mouse, then some experimentation with the macro definitions will be needed.

John's suggestion of a separate macro for the press and release is good, but I wonder how P3D4 determines how it should be dragged. There are Move and Wheel down, Wheel up codes too. But there's no way in the mouse macro mechanism to tell P3D to move from position x to position y.

If the "sb" in your macro name is referring to "speedbrake" then have you tried just assigning to the available P3D "spoiler" controls?  It is probably an axis NOT a button or switch. If so then mouse Macros are not really suitable at all. You need to either use axis controls on an axis or lever input, or buttons for INC and DEC.

Otherwise, if Aerosoft have ignored the normal controls, and experimentation with mouse action codes doesn't give you any working results I can only think that an L:Var solution be sought. You should also ask in the A320 section of the Aerosoft support forum -- someone has probably sorted it out before now. In fact, for virtually all the buttons and switches there's a contribution from a user in the User Contributions subforum, but axis controls are, of course, noticeably absent.

Pete

 

 

Link to comment
Share on other sites

Quote

is there a difference between these two strings (example)?
1[space]=[space]sb-full-press[space]=[space]RX40000170,9
1=sb-full-press=RX40000170,9

Yes, sorry - no spaces.

As Pete says, you need to play around with different (compound) codes/actions to see what, if anything, works. Otherwise investigate an L:var solution if the standard controls don't work. You can use the provide lvar plug-in to see what L:vars are available. I think there are also Linda scripts available for the A320 - these will be based on Lua & L:vars so may give you some insight, even if you do not want to use the Linda framework. As Pete suggests, the Aerosoft support forums may be the place to ask about this.

Cheers,

John

Link to comment
Share on other sites

Ok Pere, thanks for the explanation. Now I start to understand better and I can add details.
When I use the "mouse macros" I click with the left mouse button, I hold it down and drag the mouse to the position speedbrakes full open.

Note however that FSUIPC only records the left click (# 3 of "Mouse action codes"). In fact, by opening the macro file, the only recorded operation is the left mouse click (1=sb-full=RX40000170.3).

If I understood correctly, FSUIPC would have had to record one of the sequences written by John, for example: a string containing the # 9 (Left button & drag) and one with # 13 (Left release). But FSUIPC does not want to register them.

I do not know if I need it, but if I press the TAB key on my keyboard, nothing happens at all, but I can write macro name.

However, I also tried to use Linda with the "Aerosoft A3XX Professional v0.6 beta (24 Jul 18)" module, but I did not solve anything. Linda needs FSUIPC to work and is just a nice graphical interface. 😊

However I do not give up! If I can find a solution somewhere I'll write to you.

It's a matter of principle now.

Link to comment
Share on other sites

FSUIPC only records the first click. Thats why you need to edit the macro file to change the action, or if you want to change the action to a compound action (i.e. click & drag followed by release). Also, when you assign the button press to the macro, you can assign a different action on the press and release, which is why I suggested two macros, one for the left click and drag (action 9) assigned to the button press, and another for the release (action 13) for the button release. Thats just one thing to try - you could try other compound actions, activated either on a press, a release or both. 

Good luck with your investigations!

Link to comment
Share on other sites

Hi,

 

If you try to map something to the speedbrake at the Aerosoft A3XX professional, why aren't you using the spoiler axis. I have assigned one of my GoFlight levers to the spoiler axis. In addition I was able to implement the speedbrake arm function for a special area of the axis. As reference here the entries in my profile.

[Axes]
:
5=GX,256,D,22,0,0,0	-{ DIRECT: Spoilers }-
6=GX,B,12518,16383,66066,0,66067,0	-{ DIRECT: SpoilersEntering=SPOILERS_ARM_ON, Leaving=SPOILERS_ARM_OFF }-
7=GX,B,8836,11413,66065,0	-{ Entering=SPOILERS_OFF }-
:

The entry no 6 is the zone above a detent. Entering this zone will arm the speedbrake. The entry no 7 is the detent on the throttle panel. Entering this zone will set the speedbrake off. Below the detent is the normal spoiler axis activating the speedbrake according to the position of the lever. Maybe this helps you to solve your problem.

 

Rgds
Reinhard

 

Link to comment
Share on other sites

2 hours ago, aua668 said:

If you try to map something to the speedbrake at the Aerosoft A3XX professional, why aren't you using the spoiler axis.

Yes, this is what I was asking, really. I assumed he found that the normal axis controls for Spoilers did not work with that add-on.

I don't think Mouse Macros can work with axes as there's no way provided by L-M to tell it how the axis is moving. Whilst FSUIPC could read the mouse positions on press and also on release, it cannot do anything with them!

If he's only got buttons to use for thise, with no speare exis, then he could try the separate Toggle controls for Arm and Deploy.

Pete

 

 

Link to comment
Share on other sites

  • 11 months later...

Hi Pete. I just bought your programme. I have created some mouse macros using "Create Mouse Macro", but can't see how to reassign an existing macro to a different simulator button press.

I have also been unsuccessful in controlling the G1000 mfd knobs, either through sim events such as G1000_MFD_PAGE_KNOB_DEC etc. or through GPS_PAGE_KNOB_DEC etc.

Thanks - Andy

Link to comment
Share on other sites

Hi Andy,

1 hour ago, Ajayy said:

I have created some mouse macros using "Create Mouse Macro", but can't see how to reassign an existing macro to a different simulator button press.

You can assign mouse macros to physical button presses on your devices, or keyboard presses - as many as you like. You can't reassign the macro to a different simulator button press (by which I guess you mean in the simulator, i.e. the ui). For this, you need to create a new mouse macro. Or do you perhaps mean something else?

1 hour ago, Ajayy said:

I have also been unsuccessful in controlling the G1000 mfd knobs, either through sim events such as G1000_MFD_PAGE_KNOB_DEC etc. or through GPS_PAGE_KNOB_DEC etc.

Try activating event (non-axis) logging as well as button and key press logging, from the FSUIPC logging tab. Take a look at the log file (in your Modules folder) when you activate your controls to see whats happening. If you need further help with this, please post your log file (with logging activated) as well as your ini file.

Cheers,

John

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.