
MyFsMenu allows you to add your personal menu items to Flight Simulator's menu bar. The new menu items can be used to start other applications or to open documents like .pdf, .htm, .doc, .png etc.
MyFsMenu can also be used by tool authors to add menu items for their tools in FS9 without the need of having to deal with .dlls or Windows' message handling (see chapter "Tool Authors" below).
MyFsMenu.dll" and "MyFsMenu.ini" to the
"Modules" folder of FS2004.MyFsMenu.htm")
to that folder as well.MyFsMenu.ini" to add your personal menu items (see below).The "MyFsMenu.ini" file determines which menu items
will be added and what they will do when they are selected.
The [Main] section describes the items that will be added to the
menu of Flight Simulator, i. e. added to the items shown in FS's horizontal menu
bar.
[Main]
Menu0=MyTools
Menu1=MyCharts
; FirstID=50700
; DefPath=C:\Program Files\FS\Tools\
; Debug=C:\MyFsMenu.log
The "Menu<number>" keys give the items to be
added. Each value assigned is the unique name of a section in the MyFsMenu.ini
that describes what the menu item will look like and what it will do when
selected (see "Sub-Menu Sections" and "Menu-Item Sections"
further below).
First item is "Menu0", second item is "Menu1",
third item is "Menu2" and so on. The list of items stops
with the first number in sequence that has no assignment.
Each menu item needs a unique ID number that is assigned automatically starting with the number given here. If there are conflicts with menu
items of other tools (i. e. wrong functions are started), you can modify this
"seed ID" with the "FirstID" key.
Valid values are 0 to 65535 (minus number of added items), though you should avoid low numbers as they are very likely used by FS itself. Default value is 50700 - just try 50800, 50900 etc. in case you have any problems.
The "DefPath" key can be used to define a
"default path". It can be referenced in "Open"
keys (see "Menu-Item Sections"
below).
If something doesn't work as expected, a log file can be activated by assigning a file name to the
"Debug" key.
A "Sub-Menu Section" describes a list of menu items to be added, i. e. they will pop up vertically when a menu item is selected.
[MyTools]
Caption=&Tools
Menu0=GetWeather
Menu1=>Get&Weather; C:\Program Files\GetWeather\GetWeather.exe
[MyCharts]
Caption=&Charts
Menu0=>EDDS-STAR; c:\charts\edds-star.pdf
Menu1=>-
Menu2=>EDDS-ILS-07; c:\charts\edds-ils07.pdf
Menu3=>EDDS-ILS-25; c:\charts\edds-ils25.pdf
The text shown for a menu item always defaults to the name of the section.
The "Caption" key can be used to assign a different text,
e. g. a more "pretty" name. You can also mark one character in this
text with a leading "&" character to define the hotkey for the
menu item.
Like in the "[Main] Section" described above,
the "Menu<number>" keys can give the name of a
section, which either contains another "Sub-Menu
Section" (for nested menus) or a "Menu-Item
Section" that actually opens something.
You can also define a menu item immediately here by using "=>"
instead of just "=". In this case you have to give the
item's Caption, a semicolon (";")
as a separator and the file to Open immediately after it on
the same line (see "Menu-Item Sections" below for details on Caption
and Open).
A "Menu-Item Section" describes what a menu item will do, i. e. which action it will perform when selected.
[GetWeather]
Caption=Get &Weather
Open=C:\Program Files\Fs\Tools\GetWeather.exe
[EDDS-STAR]
Open=C:\Program Files\Fs\Charts\EDDS\edds_star0725.pdf
[EDDS-ILS-07]
Open=C:\Program Files\Fs\Charts\EDDS\edds_ils07.pdf
[Separator]
Caption=-
The text shown for a menu item always defaults to the name of the section.
The "Caption" key can be used to assign a different text,
e. g. a more "pretty" name. You can also mark one character in this
text with a leading "&" character to define the hotkey for the
menu item.
Special: A caption only containing a single minus character ("-")
results in a separator line in the menu.
The "Open" key gives the file name of the application
to start or the document to open. Be sure to use fully qualified file names
including drive and directory here.
You can also use some variables here to reference some special folders. If an
"Open" value contains one of the given strings, this
string is replaced by the actual folder string:
<$DLLPATH$>
Folder where the "MyFsMenu.dll" is located (=FS9's "Modules"
folder).
<$INIPATH>
Folder where the "MyFsMenu.ini" is located.
<$FS9PATH$>
Folder where the "FS9.exe" is located.
<$DEFPATH$>
The folder given with "DefPath=" in "[Main]
Section".
Example:
Open=<$DLLPATH$>MyTool.exe
Below you find the required steps, tips and issues if you want to "bundle" MyFsMenu with your tool.
In fact, there are no restrictions to use and bundle MyFsMenu with your tool, just two non binding wishes:
This is the most simple step, just rename the "MyFsMenuEx.dll"
to an appropriate name for your tool. For example, if your tool is named "CoolTool.exe",
you might want to rename the .dll to "CoolToolMenu.dll".
Now create an .ini file for your tool with the wanted menu items. Name the
.ini file like your tool, e. g. "CoolToolMenu.ini" for
"CoolToolMenu.dll".
The format of the .ini file is the same as described above, though there are some issues to consider:
MyFsMenu uses IDs starting with 50700 by default, and so does your tool now. This causes problems for users that also use MyFsMenu, other tools making use of MyFsMenu or any other tools adding menu items in a similar way.
It is therefore strongly suggested that you use different IDs by adding a
"FirstID=" line to avoid such conflicts. IDs known to be
in use already are listed below, suggested value for your tool is 40000 or higher:
| Known IDs | Used By |
|---|---|
| 13679 - 13685 | Aerosoft products (AeroCore.dll) |
| 25700 - 25708 | FsCopilot (FSCopilot.dll) |
| 25699 | FSUIPC (FSUIPC.dll) |
| 40700 - ... | MyFsTools (MyFsTools.dll) |
| 50700 - ... | MyFsMenu (MyFsMenu.dll) |
It's suggested to make use of the "<$DEFPATH$>" variable for
the "Open" key to reference your tool files in the .ini
file:
[Main]
Menu0=CoolTool
FirstID=40000
; DefPath=C:\Program Files\CoolTool\
[CoolTool]
Caption=&CoolTool
Menu0=Start
Menu1=Help
[Start]
Caption=&Start
Open=<$DEFPATH$>CoolTool.exe
[Help]
Caption=&Help
Open=<$DEFPATH$>CoolTool.htm
While no "DefPath=" is given in the .ini file, the
"<$DEFPATH$>" variable defaults to the folder of
the .ini file, so the menu will work if users install your tool in the "Modules"
folder. If this is not appropriate, you can point users to just uncomment and
adjust the "DefPath=" line to make it work.
<$...$>" variables in "Open".=>"
assignments.