Jump to content
The simFlight Network Forums

Problem Creating Mouse Macros


Recommended Posts

Hi all, 

I'm new to this forum and cockpit building in general and had some questions regarding programming mouse macros with FSUIPC: 

I have physical switches that I want to program with the pmdg 737, when I click "create mouse macro" and try to click one of the switches in the cockpit it dosnt let me. The problem is that whenever i move my mouse, FSUIPC thinks that the mouse movement is what i wish to program. in other words, when i move my mouse it wants to program the mouse movement instead of what i actually want to program. I hope this makes sense.

Does anyone have and ideas on how to fix this?

Regards, 

Max Kreckel

Link to comment
Share on other sites

By sheer luck I saw your post, in the FAQ subforum. That's a repository for answers to frequently Asked Questions, it is NOT a place for general support questions. Please always post in the main Support Forum. I've moved it for you so it could be answered.

I see you posted the same question twice, a few hours apart. Maybe you were concerned about not getting a reply, but you won't when you post to the wrong place.

I've deleted the duplicate.

 

On 7/27/2016 at 7:00 PM, MaxKreckel said:

when I click "create mouse macro" and try to click one of the switches in the cockpit it dosnt let me. The problem is that whenever i move my mouse, FSUIPC thinks that the mouse movement is what i wish to program

No, That is completely wrong. FSUIPC doesn't track mouse movements, or even mouse clicks.  The mouse macro making method involves FSUIPC placing a hook in the code inside FS where the FS mouse action code determines what to do when you click, and directs it to the appropriate Gauge. FSUIPC simply records the last part, so that it can call the code directly without any mouse being involved.

Mouse Macros are not appropriate for 90% of newer add-on aircraft (or even most default aircraft), because this method depends upon the Gauge being written to precise rules, the Microsoft FS9 C/C++ standard gauge SDK. When they don't operate on a specific aircraft or gauge you need to use other methods.

With the PMDG 737 (and the 777) this is easy -- PMDG provides "custom controls" for pretty much every function, on all of its gauges. These are listed in the PMDG SDK "header" file (.h type) for the aircraft, as installed by the PMDG installer. In FSUIPC you merely assign to <custom control>, giving the number of the control worked out from that file.

Pete

 

Link to comment
Share on other sites

Apologies for the placement of my question on the website. I understand where i went wrong. I guess what my next question is,what is the right way to assign a physical switch to a switch in the cockpit?  I didn't quite understand the last paragraph. 

Thanks for all the help, 

Max

Link to comment
Share on other sites

1 hour ago, MaxKreckel said:

I guess what my next question is,what is the right way to assign a physical switch to a switch in the cockpit?  I didn't quite understand the last paragraph.

FS reacts to "controls" -- such as those you assign in its biutton and keypress assignments, and also in FSUIPC's assignments. You surely must have already at least tried to assign controls to button or keypresses? You must have used some, even if only the "G" keypress by default assigned to GEAR TOGGLE. Your joystick axes are assigned to controls too, for ailerons, elevator etc.

Clear so far?

Well "custom" means made specially. So PMDG has "custom controls" for all the operations in their 737NGX cockpit. Custom controls have names assigned by PMDG, but FSUIPC doesn't know the names. But all controls have NUMBERS as well, and FSUIPC allows you to assign to a entry in its lists called <custom control>, then give the actual number.

To work out the number of a 737NGX control you will need to refer to the PMDG file I told you about.

I don't have or use PMDG aircraft, so that's really the most I can do to help, but if you have any specific questions, rather than a blunt "I don't understand anything" I can try to answer. After all, "didn't quite understand" is really no use without saying what the 'quite' bit was! :-)

Pete

 

Link to comment
Share on other sites

So i found the SDK file for PMDG along with the numbers for the controls. For example, the left aft fuel pump is defined as "#define EVT_OH_FUEL_PUMP_1_AFT                        (THIRD_PARTY_EVENT_ID_MIN + 37)        // 37 - FUEL PUMP LEFT AFT Switch" 

I understand the whole custom controls now as well. When FSUIPC asks for the number of the control, i get hung up. What number do i have to enter to make the left aft switch work from the line above? 

Greatly appreciating all the help.

Max

Link to comment
Share on other sites

35 minutes ago, MaxKreckel said:

What number do i have to enter to make the left aft switch work from the line above? 

Well you see this bit?

(THIRD_PARTY_EVENT_ID_MIN + 37) 

That means "add 37 to the value called "THIRD_PARTY_EVENT_ID_MIN" which I think you might find defined earlier on in the same file -- look at the top of the list.

Pete

 

Link to comment
Share on other sites

I think I found the definition for it:

// Control Events

#ifndef THIRD_PARTY_EVENT_ID_MIN
#define THIRD_PARTY_EVENT_ID_MIN                0x00011000        // equals to 69632
#endif 

Ive tried entering both of these number for example 6963237 (plus 37 for the control i want to program) 

Nothing happens though, ill click okay and FSUIPC dosnt seem to accept it. 

Max

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.