MyFsMenu 1.2 - Menu items for Flight Simulator 2004 (FS2004, FS9)

Description

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).

Download

http://www.elbiah.de/flusi/

Setup

  1. Copy both "MyFsMenu.dll" and "MyFsMenu.ini" to the "Modules" folder of FS2004.

    Not required, but it's suggested to copy this description ("MyFsMenu.htm") to that folder as well.
     
  2. Modify the "MyFsMenu.ini" to add your personal menu items (see below).
     

MyFsMenu.ini

The "MyFsMenu.ini" file determines which menu items will be added and what they will do when they are selected.

[Main] Section

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.

Example

[Main]
Menu0=MyTools
Menu1=MyCharts
; FirstID=50700
; DefPath=C:\Program Files\FS\Tools\
; Debug=C:\MyFsMenu.log

Menu0, Menu1, ...

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.

FirstID

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.

DefPath

The "DefPath" key can be used to define a "default path". It can be referenced in "Open" keys (see "Menu-Item Sections" below).

Debug

If something doesn't work as expected, a log file can be activated by assigning a file name to the "Debug" key.

Sub-Menu Sections

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.

Example

[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

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.

Menu0, Menu1, ...

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).

Menu-Item Sections

A "Menu-Item Section" describes what a menu item will do, i. e. which action it will perform when selected.

Example

[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=-

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.

Open

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

Tool Authors

Below you find the required steps, tips and issues if you want to "bundle" MyFsMenu with your tool.

Terms of use

In fact, there are no restrictions to use and bundle MyFsMenu with your tool, just two non binding wishes:

  1. A short note like "... uses MyFsMenu from http://www.elbiah.de/flusi/" in the documentation of your tool would be nice.
  2. Please mail me - flusi(at)elbiah.de - the list or range of menu IDs you actually use, so I can add it to the list below.

Create a .dll for your tool

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".

Create a .ini file for your tool

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:

Which FirstID to use?

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)

Which paths to use in Open?

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.

Changes

Vr. 1.1

Vr. 1.2

Copyright (c) 2004 by Juergen Haible, www.elbiah.de