Jump to content
The simFlight Network Forums

Problem with MACRO


Recommended Posts

Hi pete,

i try to use the MACRO function to program a specific button in my cockpit.

So when i go to Buttons+switch window and click to CREATE MACRO (down-left position) will appear another window in which i can start to create a macro

simply to insert a name of this (like MD80_FUELFLOW1) so i must close the windows and FSuipc. Until here no problem.

when i click to a button the "GREEN WINDOW" dont appear, and i cant programming yet.

Any suggestion?

thanks,

Simone

Link to comment
Share on other sites

when i click to a button the "GREEN WINDOW" dont appear, and i cant programming yet.

That means the place you are trying to program isn't susceptible to this facility. As it says in the documentation, only "some (sorry, not all) of those Panel switches and buttons and knobs" can be handled this way. The mouse macro facility can only intercept and handle calls to Gauge routines written using the standard C/C++ gauge SDK. Many aren't these days, especially not Microsoft's own gauges, and certainly no gauges written using XML.

Regards

Pete

Link to comment
Share on other sites

thanks pete for your promptly reply.

The throttle in use is the FSx 737 default. It mean that is standard gauge like reverse, autostart engines and so on...

I try another time to reset and reclick with mouse macro.

In any case any suggestion to programme the reverse with a switch button? in fsuipc the only way possible is via axis.

Thanks,

Simone

Link to comment
Share on other sites

thanks pete for your promptly reply.

The throttle in use is the FSx 737 default. It mean that is standard gauge like reverse, autostart engines and so on...

Not sure where the throttle comes in, but almost nothing in the default FSX aircraft can be driven by mouse macros. Microsoft did not obey their own SDK gauge-writing rules even in FS2004, and most of the FSX aircraft are written in XML not C/C++ in any case.

It sounds like all the functions you wish to operate have FSX controls for them, so you can assign them in the normal drop-down assignments list.

In any case any suggestion to programme the reverse with a switch button? in fsuipc the only way possible is via axis.

That's not true. How do you do it on the keyboard, for instance? You press F2. F2 sends the FS control "Throttle decr". You can assign that to any button. Set it to repeat whilst held. If you want separate reversers use Throttle1 decr, Throttle2 decr, etc.

You can easily find the FS name for any control using FSUIPC's event logging. Enable it (in the Logging tab in FSUIPC options), then operate the control (mouse or keyboard), and then look in the FSUIPC4.LOG (in the FSX Modules folder) to see what EVENT occurred. The name will be there. If you (temporarily) put FSX into Windowed mode you could even use the "console log" option to show the output to the log in real time, on screen, as you operate things.

Regards

Pete

Link to comment
Share on other sites

ok pete, where i put the specific engine1 or 2? in the fsuipc ini? this is my ini:

[buttons.McDonnell Douglas MD-82 Home Cockpit 1]

0=PB,2,C66531,0

1=PB,30,C66240,0

2=UB,30,C66240,0

5=PB,29,C65751,0

6=UB,29,C65863,0

7=RB,26,C66052,0

8=UB,26,C66053,0

9=PB,28,C66379,0

10=PB,27,C66378,0

11=UB,28,C66379,0

12=UB,27,C66378,0

13=PB,31,C66240,0

14=UB,31,C66240,0

15=RB,7,C66080,0

18=UB,7,C66079,0

19=PB,1,C66725,0

20=PB,6,C65572,0

21=PB,3,C65971,0

22=PB,0,C66725,0

23=UB,0,C66725,0

24=UB,1,C66725,0

25=UB,3,C65972,0

the button assign in the fsuipc is 0 - 3

Simone

Link to comment
Share on other sites

ok pete, where i put the specific engine1 or 2? in the fsuipc ini? this is my ini:

NO!

Why are you editing the INI file?

Run FS. Get to flight mode. Look in the Menu. You should see "AddOns". Click it. select FSUIPC. Then you will get a set of tabs which allow you to set FSUIPC options and make assignments and so on, WITHOUT touching the INI file. FSUIPC does that for you.

Please please please do look a little more at the FSUIPC User Guide. There are pictures in there showing you the assorted options pages. You assign Buttons in the Buttons tab, Keypresses in the Keys tab, Axes in the Axes tab, and do calibrations in the Joysticks tab. You only have to go to the INI file to do complex things, not easy stuff like assignments!!

You will see that everywhere you can assign an FS control you can also set a parameter. It isn't hard to find where, it is actually labelled "Parameter", which surely isn't very obscure? :-(

Pete

Link to comment
Share on other sites

very very thanks Pete, i have resolve some of my numerous problems. :D

So, another problem:

i program the "TOGGLE MASTER BATTERY" with the appropriate switch selector in my real Md80 OH.

I put in control sent when The button pressed the fs control (log with fs dialogbox) TOGGLE MASTER BATTERY,

and then in control sent when button released the same: TOGGLE MASTER BATTERY.

The problem is when i click off the cockpit are in ON position and when i switch in on the cockpit off in cold and dark. :(

How to do to invert the switch function?

Thanks,

Simone

Link to comment
Share on other sites

i program the "TOGGLE MASTER BATTERY" with the appropriate switch selector in my real Md80 OH.

I put in control sent when The button pressed the fs control (log with fs dialogbox) TOGGLE MASTER BATTERY,

and then in control sent when button released the same: TOGGLE MASTER BATTERY.

The problem is when i click off the cockpit are in ON position and when i switch in on the cockpit off in cold and dark. :(

How to do to invert the switch function?

If you are using that control you must synchronize the FS setting with the hardware switch. Use the on-screen switch to do this. Save a flight with the switch off, always close down FS with the switch off so when you load next time they are in agreement.

There is no other way with TOGGLE controls, unless you write a Lua plug-in to test the battery state first, or use one of the Offset controls to write to the battery switch offset in FSUIPC. Both of these are a little too advanced for someone just starting out, I think.

Pete

Link to comment
Share on other sites

i have resolve in this manner: i put the parameter 1 in the first function and in the second 0. IT work.

It's a correct way?

If it works. But are you sure it isn't just coincidence, that this time you simply you had it synchronised to start with? All of the TOGGLE controls just TOGGLE (i.e. change the state) as far as I know. I've never found one that SETs instead. It doesn't make a lot of sense when you know that a parameter of 0 toggles for certain, as you proved originally.

Pete

Link to comment
Share on other sites

  • 1 month later...

Dear Pete,

how are you. So for my cockpit i find one software that can be read completly via MACRO function.

So i have encoured several problem programming these buttons:

1 - BATTERY_switch (is a ON-OFF + ARM switch). I open FSUIPC, buttons windows, create macro. I assign a name of my plane (80 in my case) and close FSUIPC.

i click over the battery switch and automatically the green macro window appear. So when it' white i assign the function OH_BATTERY_SWITCH_ON. and click ok.

Turn in FSUIPC and End macros. Now i have in the FS controls menu the appopriate offset 80_OH_BATTERY SWITH_ON

When i go to the fsuipc and assign this offset to button key (previously identify to one joystick button) i choose the appropriate function in the FSmenu (80_OH_BATTERY SWITH_ON) and assign it to my joystick button. Close FSUIPC...i click my button and correctly battery switch assign the value from OFF to ON. The problem is when i want to turn on OFF position....in this case the battery switch go to the ARM position. why? i have not assign this function.

I think that the correct use of Macro function is to assign a value to Battery switch ON and another value to Battery switch OFF. I nthe fsuipc can put the value battery on on the first colum and then when press another time the control i assign the value Battery switch OFF....it's correct? the same thing for the others switch?

2 - Momentary Switch....the problem is that i can assign the value for example to a Gen bus...but when i click to the momentary switch the press remaining in ON position!

Attend your precious help...

thanks,

Simone

Link to comment
Share on other sites

1 - BATTERY_switch (is a ON-OFF + ARM switch). I open FSUIPC, buttons windows, create macro. I assign a name of my plane (80 in my case) and close FSUIPC.

i click over the battery switch and automatically the green macro window appear. So when it' white i assign the function OH_BATTERY_SWITCH_ON. and click ok.

Didn't you TEST it first, as suggested in the text which appears? When you repeatedly click with the mouse, does the same thing happen as when you press "TAB" to test it? Did you read this part of the FSUIPC user guide?

The fourth line is important:

Press TAB to test.

This is something you should most certainly do IF you want to use this particular control. There is no point in giving it a name and having it added to the Macro file if it isn’t going to work! So, press TAB. Check that when TAB is pressed, the same thing happens on your panel as when you used the mouse. If it does, well and good. If not, then look in the data window for a little label in the form “(n of n)”—for example “(1 of 4)”. If this is present this means that the mouse click may use one of several (4 in this case) different ways into the same routine, and FSUIPC4 is unable to tell which is correct.

When this occurs, you still use TAB to test as usual. Of course, if it works the correct switch in the correct way, just continue to name it as described next. If not, click that same switch again -- it will change to “2 of 4” (say). Then re-test using TAB. And so on. Only when the correct action occurs when pressing TAB do you want to name the macro and move on.

When i go to the fsuipc and assign this offset to button key (previously identify to one joystick button) i choose the appropriate function in the FSmenu (80_OH_BATTERY SWITH_ON) and assign it to my joystick button. Close FSUIPC...i click my button and correctly battery switch assign the value from OFF to ON. The problem is when i want to turn on OFF position....in this case the battery switch go to the ARM position. why? i have not assign this function.

When you click the same place with the mouse, do you get the same results? Maybe the routine being called toggles between "ON" and "ARM". You'd need to find the correct command for "OFF" in that case. Possibly it needs some other mouse action. See the boxed section in the Guide entitled

Variations for Mouse activated switches which might be made to work by editing the Macro file

I think that the correct use of Macro function is to assign a value to Battery switch ON and another value to Battery switch OFF. I nthe fsuipc can put the value battery on on the first colum and then when press another time the control i assign the value Battery switch OFF....it's correct? the same thing for the others switch?

Sorry, I don't understand this question fully enough to answer sensibly.

2 - Momentary Switch....the problem is that i can assign the value for example to a Gen bus...but when i click to the momentary switch the press remaining in ON position!

Same sort of thing. You need to TEST, and possibly edit the file with mouse action values.

Without the aircraft you are using I cannot really tell. It is entirely possible that the way it is programmed is not susceptible to FSUIPC's mouse macro facilities. Do the makers supply any other way of operating these switches -- keyboard or joystick assignments? Surely they are not mouse operated only? You should also enable FSUIPC's Event logging and see if the actions you want are merely generating normal FS events. If so you could assign directly to them instead.

Regards

Pete

Link to comment
Share on other sites

ok pete,

the battery work to assign On and OFF.

i dont understand this point (not in my Fsuipc guide) :

If not, then look in the data window for a little label in the form “(n of n)”—for example “(1 of 4)”. If this is present this means that the mouse click may use one of several (4 in this case) different ways into the same routine, and FSUIPC4 is unable to tell which is correct.

When this occurs, you still use TAB to test as usual. Of course, if it works the correct switch in the correct way, just continue to name it as described next. If not, click that same switch again -- it will change to “2 of 4” (say). Then re-test using TAB. And so on. Only when the correct action occurs when pressing TAB do you want to name the macro and move on.

For the Consol Log there is a method to stop some variables (continuosly) that dont permit to read me the correct mouse click inputs?

thanks,

Simone

Link to comment
Share on other sites

i dont understand this point (not in my Fsuipc guide) :

If not, then look in the data window for a little label in the form “(n of n)”—for example “(1 of 4)”. If this is present this means that the mouse click may use one of several (4 in this case) different ways into the same routine, and FSUIPC4 is unable to tell which is correct.

When this occurs, you still use TAB to test as usual. Of course, if it works the correct switch in the correct way, just continue to name it as described next. If not, click that same switch again -- it will change to “2 of 4” (say). Then re-test using TAB. And so on. Only when the correct action occurs when pressing TAB do you want to name the macro and move on.

Which part don't you understand? Are you seeing "(1 of ..." something in the window? If not whay are you asking?

For the Consol Log there is a method to stop some variables (continuosly) that dont permit to read me the correct mouse click inputs?

Sorry, I don't understand. What are you logging which causes continuous variable logging? What mouse click inputs are you wanting to read? The console log is anyway only a copy of the log file.

Have you bothered to check whether normal FS controls (events) are being used, as I suggested? Is the aircraft only mouse controlled -- don't the authors provide any other way?

Regards

Pete

Link to comment
Share on other sites

The panel is MADDOG by leonardo. Most of functions are porgrammable via Macro facility, other not.

For example is possible to assign values for The APU MASTER switch (off and run)...also start momentary switch but only click not momentary switch.

thanks pete for your helps,

Simone

Link to comment
Share on other sites

i dont understand how is this data window...is a consol log?

The FSUIPC4 console log is enabled in the Logging Tab in FSUIPC4. Is that what you mean? You have to run FSX in Windowed mode to see it because it is another normal Window. But all it shows is the same data as goes into the normal FSUIPC4 log file, so you can look at that instead.

and when i look in the data window how is the little label in the form (n of n)?

Are you now referring to the prompt for a macro name when creating macros? The (n of n) part will only appear if a mouse area has several different entries in the Tables in the Gauge which handles it. This enables you to select different functions when the Gauge is programmed in that way. If it is not, you do not see the (n of n) part because it doesn't apply.

All this is explained much better than I can do here in the User Guide. Maybe you are asking a specific question, but if so I cannot yet understand what your question is I'm afraid.

Regards

Pete

Link to comment
Share on other sites

ok pete,

i try to follow your suggestions.

For the console log, i see some contiuosly scripts that dont permit me to read the mouse click events.

Is because there are some open offsets in use?

Thanks,

Simone

Link to comment
Share on other sites

For the console log, i see some contiuosly scripts that dont permit me to read the mouse click events.

I'm sorry, what "console log" do you mean? Have you enabled this in the FSUIPC Logging tab? What logging items have you checked? What is it you want to do with this logging?

Is because there are some open offsets in use?

Sorry, what do you mean by that? What are "open offsets"?

This exchange is very confusing. I do not know what you are trying to do, nor what you are looking at, nor why. If you have a specific problem could you please explain what it is? If you want me to look at some logs for you, please paste them in.

Regards

Pete

Link to comment
Share on other sites

Pete,

when you open a consol log from FSUIPC a window appear and al the FS functions you see on the window.

So, many scripts run continuosly and it's difficult to read the last mouse clicks.

I try to asky you a way to stop these continuosly run scripts see to consol log...

hope you understand my request...

Simone

Link to comment
Share on other sites

when you open a consol log from FSUIPC a window appear and al the FS functions you see on the window.

So, many scripts run continuosly and it's difficult to read the last mouse clicks.

But WHAT are you seeing running "continuously"? Something is wrong, but I can't see what you are seeing, I am too far away! ;-)

The contents of the console log are merely copies of what is put into the FSUIPC log file, on disk. That will not go too fast for you to read because you can load it into Notebook or any other editor and read it at your leisure! Not only that, but it is easy for you to paste it, or part of it, here, so I can tell what you are seeing!

I have said this before but you must have misunderstood.

Also, I need to know what it is you want to read from the Log so I know what you think you are doing.

I try to asky you a way to stop these continuosly run scripts see to consol log...

I cannot tell you any answer since I don't know what you are seeing. There should be no "continuously running scripts". Maybe you have enabled too many logging options (I asked you about that too, but you do not answer my questions :-( ).

In either case the answer is in the Log file itself. I don't understand why you do not refer to this as I asked.

Regards

Pete

Link to comment
Share on other sites

Ok Pete,

i try to implement my cockpit with small steps...some of offset now work with general fsuipc offsets and fantastic macro function.

Can you explain me what is the parameter (what i can put inside) in the fsuipc buttons section?

Thanks,

Simone

Link to comment
Share on other sites

Can you explain me what is the parameter (what i can put inside) in the fsuipc buttons section?

The parameter field is used for data to be sent along with the control being used. Most controls do not use a parameter, but those ending in "Set" do, as well as some others. I cannot tell you a general answer, you must say what you want to do, what control it is you want to use.

There are clear examples in the FSUIPC user guide. Look in the section on Button Programming, starting with the paragraph which begins "Most if not all of those with the word “set” in their name are controls that take a parameter."

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.