• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Hoooo Rah!

Messages
10,163
Country
us-arizona
Well... I got something working.

I was sitting here this morning thinking how I could use one dial set for two readouts (HDG and CRS). (This was before Bill Leaming posted his brilliant work on using one button for multiple window functions).

This is one beauty of gauge code technology. I didnt even think of using the same thing on a ton of different avenues as Bill was explaining today in the afternoon.

But, back earlier, my mind put two and two together, that a mouse click zone, being assigned 'Visibility' functions, makes the exact same click zone able to be used in Layers. Layers are Pages. Or, in my case, having a 'thing' (small graphics bracket outlining a small digital window) having that thing appear, opens the click zone (like a key) allowing it to fuction. Thus, one can click on a window, bringing up the outline graphics, and then functionality occurs with 'that' digital window interface 'only'.

Brilliant....

Dwight usually does this for me and he is like a University Professor compared to me, but for my mind to get to grips of how something like this functions/works in FS, it just so amazes me.

What things that are now possible with this door now opened......

Awesome.
 
Interesting technique, never thought of it. I personally just fill my mouseclick scripts with conditions, so their behavior changes depending on any number of things.

Some of my mouseclick scripts are huge because of this, I bet a few are 100 lines or more, but I never actually counted them.
 
Interesting technique, never thought of it. I personally just fill my mouseclick scripts with conditions, so their behavior changes depending on any number of things.

Daniel, I used to do that as well until I got to the G1000, and discovered that one single "soft key" can have as many as twenty different outcomes, depending on what page, sub-page, sub-sub-page, or sub-sub-sub-page one is on at any given time.

At that point, I determined that there just HAD to be a easier way! :eek:

Thus, I discovered to my infinite joy that <Visibility> works in an <Area> just as it does in an <Element>!

"O frabjous day! Callooh! Callay!"
 
Ahhh.. so 20 is a limit for a clickzone stack... good to know also. I would have pushed it to my fave '200' number..


:eek:
 
No, Bill means that the real thing has 20 possible outcomes. I don't think there's a limit you need to worry about in FS - well, not a realistically reachable one anyway. 200 would probably be fine.
 
Just for fun, here is one of my lengthy MouseClicks

Code:
(L:G500_PageMenuNoOptions, bool)
	if{ quit }
(L:G500_MFDCursorMode, bool)
if{ 	(L:G500_PageMenuSetup, bool)
		if{ 	(L:G500_MFDCursorPosition, number) 1 > 
				if{ (L:G500_MFDCursorPosition, number) -- (>L:G500_MFDCursorPosition, number) }
			quit
		}
	(L:G500_MFDPage, number) 1 ==
		if{ (L:G500_PageMenuMapSetupDefaults, bool) !
			if{ (L:G500_PageMenuMapSetup, bool)
					if{ (L:G500_MapSetupGroup, bool)
						if{	(L:G500_MFDCursorPosition, number) 1 ==
								if{ (L:G500_MapSetupGroup, bool) ! (>L:G500_MapSetupGroup, bool) }
							(L:G500_MFDCursorPosition, number) 2 ==
								if{ (L:G500_MFDMap1INTNDBRange, number) 11 > 
									if{ (L:G500_MFDMap1INTNDBRange, number) -- (>L:G500_MFDMap1INTNDBRange, number) } 
									els{ 0 (>L:G500_MFDMap1INTNDBRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 3 ==
								if{ (L:G500_MFDMap1VORRange, number) 17 > 
									if{ (L:G500_MFDMap1VORRange, number) -- (>L:G500_MFDMap1VORRange, number) } 
									els{ 0 (>L:G500_MFDMap1VORRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 4 ==
								if{ (L:G500_MFDMap1AirspaceRange, number) 18 > 
									if{ (L:G500_MFDMap1AirspaceRange, number) -- (>L:G500_MFDMap1AirspaceRange, number) } 
									els{ 0 (>L:G500_MFDMap1AirspaceRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 5 ==
								if{ 	(L:G500_MFDMap1Airways, number) -- (>L:G500_MFDMap1Airways, number) 
									(L:G500_MFDMap1Airways, number) 0 < if{ 3 (>L:G500_MFDMap1Airways, number) }
								}
							quit
						}
						els{	(L:G500_MFDCursorPosition, number) 1 ==
								if{ (L:G500_MapSetupGroup, bool) ! (>L:G500_MapSetupGroup, bool) }
							(L:G500_MFDCursorPosition, number) 2 ==
								if{ 	(L:G500_MFDMap1Orientation, number) -- (>L:G500_MFDMap1Orientation, number)
									(L:G500_MFDMap1Orientation, number) 0 < if{ 3 (>L:G500_MFDMap1Orientation, number) }
								 }
							(L:G500_MFDCursorPosition, number) 3 ==
								if{	(L:G500_MFDMap1NorthUpAt, number) 17 >
										if{ (L:G500_MFDMap1NorthUpAt, number) -- (>L:G500_MFDMap1NorthUpAt, number) }
								 }
							(L:G500_MFDCursorPosition, number) 4 ==
								if{ 	(L:G500_MFDMap1AutoZoom, bool) ! (>L:G500_MFDMap1AutoZoom, bool)
									0 (>L:G500_MFDMap1AutoZoomTempDisable, bool)
								 }
							(L:G500_MFDCursorPosition, number) 5 ==
								if{ (L:G500_MFDMap1WindVector, bool) ! (>L:G500_MFDMap1WindVector, bool) }
							(L:G500_MFDCursorPosition, number) 6 ==
								if{ (L:G500_MFDMap1NavRing, bool) ! (>L:G500_MFDMap1NavRing, bool) }
							(L:G500_MFDCursorPosition, number) 7 ==
								if{ (L:G500_MFDMap1Topo, bool) ! (>L:G500_MFDMap1Topo, bool) }
							(L:G500_MFDCursorPosition, number) 8 ==
								if{ (L:G500_MFDMap1TopoScale, bool) ! (>L:G500_MFDMap1TopoScale, bool) }
							quit
						}
					}
			}
			els{ (L:G500_PreviousMFDCursorPosition, number) 1 == 
					if{ (L:G500_MFDCursorPosition, number) 2 >
							if{ (L:G500_MFDCursorPosition, number) -- (>L:G500_MFDCursorPosition, number) }
					}
					els{ (L:G500_MFDCursorPosition, number) 1 >
							if{ (L:G500_MFDCursorPosition, number) -- (>L:G500_MFDCursorPosition, number) }
					}
			}
		 }
	(L:G500_MFDPage, number) 2 ==
		if{ (L:G500_PageMenuMapSetupDefaults, bool) !
			if{ (L:G500_PageMenuMapSetup, bool)
					if{ (L:G500_MapSetupGroup, bool)
						if{	(L:G500_MFDCursorPosition, number) 1 ==
								if{ (L:G500_MapSetupGroup, bool) ! (>L:G500_MapSetupGroup, bool) }
							(L:G500_MFDCursorPosition, number) 2 ==
								if{ (L:G500_MFDMap2INTNDBRange, number) 11 > 
									if{ (L:G500_MFDMap2INTNDBRange, number) -- (>L:G500_MFDMap2INTNDBRange, number) } 
									els{ 0 (>L:G500_MFDMap2INTNDBRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 3 ==
								if{ (L:G500_MFDMap2VORRange, number) 17 > 
									if{ (L:G500_MFDMap2VORRange, number) -- (>L:G500_MFDMap2VORRange, number) } 
									els{ 0 (>L:G500_MFDMap2VORRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 4 ==
								if{ (L:G500_MFDMap2AirspaceRange, number) 18 > 
									if{ (L:G500_MFDMap2AirspaceRange, number) -- (>L:G500_MFDMap2AirspaceRange, number) } 
									els{ 0 (>L:G500_MFDMap2AirspaceRange, number) } 
								}
							(L:G500_MFDCursorPosition, number) 5 ==
								if{ 	(L:G500_MFDMap2Airways, number) -- (>L:G500_MFDMap2Airways, number) 
									(L:G500_MFDMap2Airways, number) 0 < if{ 3 (>L:G500_MFDMap2Airways, number) }
								}
							quit
						}
						els{	(L:G500_MFDCursorPosition, number) 1 ==
								if{ (L:G500_MapSetupGroup, bool) ! (>L:G500_MapSetupGroup, bool) }
							(L:G500_MFDCursorPosition, number) 2 ==
								if{ 	(L:G500_MFDMap2Orientation, number) -- (>L:G500_MFDMap2Orientation, number)
									(L:G500_MFDMap2Orientation, number) 0 < if{ 3 (>L:G500_MFDMap2Orientation, number) }
								 }
							(L:G500_MFDCursorPosition, number) 3 ==
								if{	(L:G500_MFDMap2NorthUpAt, number) 17 >
										if{ (L:G500_MFDMap2NorthUpAt, number) -- (>L:G500_MFDMap2NorthUpAt, number) }
								 }
							(L:G500_MFDCursorPosition, number) 4 ==
								if{ 	(L:G500_MFDMap2AutoZoom, bool) ! (>L:G500_MFDMap2AutoZoom, bool)
									0 (>L:G500_MFDMap2AutoZoomTempDisable, bool)
								 }
							(L:G500_MFDCursorPosition, number) 5 ==
								if{ (L:G500_MFDMap2WindVector, bool) ! (>L:G500_MFDMap2WindVector, bool) }
							(L:G500_MFDCursorPosition, number) 6 ==
								if{ (L:G500_MFDMap2NavRing, bool) ! (>L:G500_MFDMap2NavRing, bool) }
							(L:G500_MFDCursorPosition, number) 7 ==
								if{ (L:G500_MFDMap2Topo, bool) ! (>L:G500_MFDMap2Topo, bool) }
							(L:G500_MFDCursorPosition, number) 8 ==
								if{ (L:G500_MFDMap2TopoScale, bool) ! (>L:G500_MFDMap2TopoScale, bool) }
							quit
						}
					}
			}
			els{ (L:G500_PreviousMFDCursorPosition, number) 1 == 
					if{ (L:G500_MFDCursorPosition, number) 2 >
							if{ (L:G500_MFDCursorPosition, number) -- (>L:G500_MFDCursorPosition, number) }
					}
					els{ (L:G500_MFDCursorPosition, number) 1 >
							if{ (L:G500_MFDCursorPosition, number) -- (>L:G500_MFDCursorPosition, number) }
					}
			}
		 }
	(L:G500_MFDPage, number) 3 ==
		if{	(L:G500_MFDCursorPosition, number) 1 == 
				if{ 	(L:G500_DisplayBrightness, number) 1 >
						 if{ (L:G500_DisplayBrightness, number) -- (>L:G500_DisplayBrightness, number) } 
					0 (>L:G500_AutoBrightness, bool) 
				} 
			(L:G500_MFDCursorPosition, number) 2 == 
				if{ (L:G500_AutoBrightness, bool) ! (>L:G500_AutoBrightness, bool) }
			(L:G500_MFDCursorPosition, number) 3 == 
				if{ (L:G500_Vbg, knots) 0 > if{ (L:G500_Vbg, knots) -- (>L:G500_Vbg, knots) } } 
			(L:G500_MFDCursorPosition, number) 4 == 
				if{ 0 (>L:G500_VbgOn, bool) } 
			(L:G500_MFDCursorPosition, number) 5 == 
				if{ (L:G500_Vr, knots) 0 > if{ (L:G500_Vr, knots) -- (>L:G500_Vr, knots) } } 
			(L:G500_MFDCursorPosition, number) 6 == 
				if{ 0 (>L:G500_VrOn, bool) } 
			(L:G500_MFDCursorPosition, number) 7 == 
				if{ (L:G500_Vx, knots) 0 > if{ (L:G500_Vx, knots) -- (>L:G500_Vx, knots) } } 
			(L:G500_MFDCursorPosition, number) 8 == 
				if{ 0 (>L:G500_VxOn, bool) } 
			(L:G500_MFDCursorPosition, number) 9 == 
				if{ (L:G500_Vy, knots) 0 > if{ (L:G500_Vy, knots) -- (>L:G500_Vy, knots) } } 
			(L:G500_MFDCursorPosition, number) 10 == 
				if{ 0 (>L:G500_VyOn, bool) }  
			(L:G500_MFDCursorPosition, number) 11 == 
				if{ (L:G500_WindStyle, number) 0 > if{ (L:G500_WindStyle, number) --  (>L:G500_WindStyle, number) } } 
			(L:G500_MFDCursorPosition, number) 12 == 
				if{ (L:G500_TimeMode, number) 0 > if{ (L:G500_TimeMode, number) --  (>L:G500_TimeMode, number) } } 
			(L:G500_MFDCursorPosition, number) 13 == 
				if{ (L:G500_TimeOffset, number) -23 > if{ (L:G500_TimeOffset, number) --  (>L:G500_TimeOffset, number) } } 
			(L:G500_MFDCursorPosition, number) 14 == 
				if{ (L:G500_DisSpdUnits, number) 0 > if{ (L:G500_DisSpdUnits, number) -- (>L:G500_DisSpdUnits, number) } }
			(L:G500_MFDCursorPosition, number) 15 == 
				if{ (L:G500_AltVsUnits, number) 0 > if{ (L:G500_AltVsUnits, number) -- (>L:G500_AltVsUnits, number) } }
			(L:G500_MFDCursorPosition, number) 16 == 
				if{ (L:G500_NavAngleTrue, bool) ! (>L:G500_NavAngleTrue, bool) } 
			(L:G500_MFDCursorPosition, number) 17 == 
				if{ (L:G500_PressHPA, bool) ! (>L:G500_PressHPA, bool) } 
			(L:G500_MFDCursorPosition, number) 18 == 
				if{ (L:G500_TempFahrenheit, bool) ! (>L:G500_TempFahrenheit, bool) } 
	 	}
	(L:G500_MFDPage, number) 5 ==
		if{ 	(L:G500_MFDCursorPosition, number) 1 == 
				if{ (L:G500_SelectedFPWPIndex, number) 0 > 
					if{ (L:G500_SelectedFPWPIndex, number) -- (>L:G500_SelectedFPWPIndex, number) }
				}
			(L:G500_MFDCursorPosition, number) 3 == 
				 if{ (L:G500_EnteringMinimums, bool) !
					if{ 	1 (>L:G500_EnteringMinimums, bool)
						1 (>L:G500_MinimumsCursorPosition, number) 
					 }
					els{ 	(L:G500_MinimumsCursorPosition, number) 1 ==
							if{ (L:G500_MinimumAltitude, number) 1000 - (>L:G500_MinimumAltitude, number) }
						(L:G500_MinimumsCursorPosition, number) 2 ==
							if{ (L:G500_MinimumAltitude, number) 100 - (>L:G500_MinimumAltitude, number) }
						(L:G500_MinimumsCursorPosition, number) 3 ==
							if{ (L:G500_MinimumAltitude, number) 10 - (>L:G500_MinimumAltitude, number) }
						(L:G500_MinimumsCursorPosition, number) 4 ==
							if{ (L:G500_MinimumAltitude, number) 1 - (>L:G500_MinimumAltitude, number) }
						(L:G500_MinimumAltitude, number) 0 < 
							if{ 0 (>L:G500_MinimumAltitude, number) }
					}
				}
		}
	(L:G500_MFDPage, number) 6 == 
		if{ (L:G500_ResolveMultiples, bool) 
			if{ (L:G500_SelectedDuplicate, number) 1 >
				if{ 	(L:G500_SelectedDuplicate, number) -- (>L:G500_SelectedDuplicate, number)
					(L:G500_SelectedDuplicate, number) 1 - (>@c:IcaoSearchMatchedIcao)
					(@c:IcaoSearchCurrentICAO, string) (>@c:FacilityICAO)
				 } 
			}
			els{ (L:G500_EnteringInput, number) 0 ==
				if{	(L:G500_MFDCursorPosition, number) 1 == 
						if{ 	(@c:FacilityICAO) (>@c:IcaoSearchInitialIcao)
							'AVNWX' (>@c:IcaoSearchStartCursor)
							1 (>L:G500_EnteringInput, number)
							0 (>@c:IcaoSearchMatchedIcao)
						}
					(L:G500_MFDCursorPosition, number) 2 == 
						if{ (@c:WaypointAirportCurrentRunway, enum) 0 >
							if{ (@c:WaypointAirportCurrentRunway, enum) -- (>@c:WaypointAirportCurrentRunway, enum) }
						}
					(L:G500_MFDCursorPosition, number) 3 == 
						if{ (L:G500_SelectedFrequencyIndex, number) 0 >
							if{ (L:G500_SelectedFrequencyIndex, number) -- (>L:G500_SelectedFrequencyIndex, number) }
						}
				}
				els{ -1 (>@c:IcaoSearchAdvanceCharacter) }
			}
		}
}
els{ 	(L:G500_MFDGroup, number) 0 == 
		if{ (L:G500_MFDMapPage, number) 0 > if{ (L:G500_MFDMapPage, number) 1 - (>L:G500_MFDMapPage, number) } }
	(L:G500_MFDGroup, number) 1 == 
		if{ (L:G500_MFDAuxPage, number) 0 > if{ (L:G500_MFDAuxPage, number) 1 - (>L:G500_MFDAuxPage, number) } }
	(L:G500_MFDGroup, number) 2 == 
		if{ 	(L:G500_MFDFplPage, number) 0 > 
				if{ (L:G500_MFDFplPage, number) 1 - (>L:G500_MFDFplPage, number) } 
			0 (>L:G500_WaypointPagePopup, bool)
		} 
	0 (>L:G500_MFDCursorPosition, number) 
}

This is a single mouseclick script, overwhelming indeed, I think I will use Bill's approach in my next project. One typo in this, and you can spend hours trying to figure out what is wrong. With Bills approach you would know exactly which "section" was causing problems.


And to be helpful to the OP, here is the mouseclick for turning a knob CCW. Easier to read and follow. For less complicated scripts like this, I will probably stick with using conditions.

Code:
(L:G500_PFDKnobFunc, number) 0 == if{ (>K:HEADING_BUG_DEC) }
(L:G500_PFDKnobFunc, number) 1 == 
	if{ (L:G500_CDISource, bool)
		if{	(L:G500_CDINav12, bool)
				if{ (>K:VOR2_OBI_DEC) }
				els{ (>K:VOR1_OBI_DEC) } 
		}
	}
(L:G500_PFDKnobFunc, number) 2 == if{ (>K:AP_ALT_VAR_DEC) }
(L:G500_PFDKnobFunc, number) 3 == if{ @APVS -2000 <= if{ } els{ (>K:AP_VS_VAR_DEC) } } 
(L:G500_PFDKnobFunc, number) 4 == if{ (>K:KOHLSMAN_DEC) }
(P:Absolute time, seconds) (>L:G500_PFDKnobActive, number)
 
Back
Top