Page 1 of 1

Parking some material for the KB here until I get around to it

Posted: 06 Jan 2022 12:22
by ColeValleyGirl
Courtesy of Jane:

FH Command Line Parameters
Usage

fh [/INI:<inifile-name>] [<file-name>]

<file-name> can be a GEDCOM file to open


Some Inifile settings (i.e. Window, Record and SuppressWarningsOnLoad) have no effect unless a command line GEDCOM file is specified to open - see 'Format of Startup Inifiles' below.
Format of Startup Inifiles

A startup INI file has the following format:

Code: Select all

[Startup]
Window=FocusWin [or RecordWin or DiagramWin]
DiagramType=<diagram-type>
Record=<record-id>
<record-id> must be the record id of an Individual or Family record to show at startup, and must be prefixed with an 'I' for Individual records or an 'F' for family records. The 'Window' is the startup window.

<diagram-type> is ignored unless Window=DiagramWin, in which case it is required. Specifies the name of a standard or custom diagram type, prefixed with “C-” if it is a custom diagram and “S-” if it is a standard diagram. For example: “DiagramType=C-Ancestors - 4 Gens” (without the quotes).

Re: Parking some material for the KB here until I get around to it

Posted: 06 Jan 2022 17:07
by jelv
<filename> can be either a GEDCOM or a FH project file.

Re: Parking some material for the KB here until I get around to it

Posted: 11 Jan 2022 16:13
by Mark1834
Published here.

Is there anything else to say on ini files? They seem to be undocumented, so presumably Jane’s description comes from inside knowledge at CP?

Re: Parking some material for the KB here until I get around to it

Posted: 11 Jan 2022 17:12
by jelv
There's some duff information in there - see https://www.fhug.org.uk/forum/viewtopic ... 08#p120308 for what I discovered. I've also created a script that makes it easy to create different shortcuts using parameters.

The family option only works with the recordwin option (makes sense as the focus window would have to know whether to focus on the husband or wife).

Re: Parking some material for the KB here until I get around to it

Posted: 11 Jan 2022 17:53
by Mark1834
Thanks John. I've amended the KB to say that the Focus Window is only relevant for Individuals.

I must admit that I prefer your form of the command script with the additional variables to avoid the over-long commands. I'd welcome Jane's view on whether it would be worthwhile to incorporate that into the store plugin, rather than offer multiple solutions that do essentially the same thing.

Re: Parking some material for the KB here until I get around to it

Posted: 11 Jan 2022 19:07
by jelv
One thing I suppose I could do is add another variable for record or focus window, forcing record if the Id begins with F. I'd probably make the default focus for individual (and record for family) if the parameter was omitted- or just do that anyway without the extra parameter.