* Quick Link Creator

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Quick Link Creator

Post by Jane » 10 Aug 2017 11:01

I have written a small plugin which creates a "link" file on your desktop for a selected person.

Please see later post for the most recent version.
Last edited by Jane on 12 Aug 2017 10:36, edited 1 time in total.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 10 Aug 2017 12:45

That is neat Jane.

But I think it needs to inform the user the batch file has been saved to Desktop and needs to be run to start FH next time.
Otherwise, not only does it appear that nothing has happened, but also the user does not know what to do.

I am fascinated how you discovered that FH has an INI file to perform that trick.

What else can that INI file do?

Why doesn't FH use it to let users choose which Individual has Focus on restart?

I've added this Plugin to how_to:remember_current_records_being_updated|> Remember Current Records being Updated.

However, I think the Plugin name could be better as it does not really convey what it is for ~ creates quick link to what?
Maybe something like Open Individual in Next Session would be better?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Quick Link Creator

Post by davidm_uk » 10 Aug 2017 14:45

Yes, very neat :)

Is there an alternative for "Window=FocusWin" to open just the individual properties window (floating)? I never use the focus window. I'm quite happy to copy and modify the desktop cmd file rather than start complicating the plugin.

I'm sure that others will ask for all sorts of variations. As Mike says, knowing "What else can that INI file do?" would be very interesting.
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 10 Aug 2017 14:53

Funnily enough I am not using it as a remember for next time, which is why it names the files with the persons details. I use it to drop the file into Evernote, so I can jump to the right person from my research notes.

The INI only does the couple of things at the moment so start on a person and select Focus (FocusWin) or Record Window (RecordWin).

I knew about it as is was done as a "paid for" change for a Project I did for My History creating automated charts using Family Historian which is driven by a web site.

I have added a message once the file is created. Do you think it's worth offering to save with the Name as now, as well as a "fixed" file name so if you did just want to always save to the same filename you could. I have not changed the name yet, I might wait until the functionality has settled.
Last edited by Jane on 11 Aug 2017 17:41, edited 1 time in total.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Quick Link Creator

Post by davidm_uk » 10 Aug 2017 15:24

The INI only does the couple of things at the moment so start on a person and select Focus (FocusWin) or Record Window (RecordWin).
That was quick, works a treat.
Thanks Jane
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 10 Aug 2017 15:44

Sounds like it needs a simple GUI to offer user some options :-
  • Choose Individual if currently selected record is wrong one
  • Use a Fixed Filename or Person & Project Filename
  • Startup in Focus Window or in Records Window
The GUI could hold the explanatory message about the Desktop command file.

A button would create the Desktop command file.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
BillH
Megastar
Posts: 2183
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Quick Link Creator

Post by BillH » 10 Aug 2017 15:49

Jane wrote:Do you think it's worth offering to save with the Name as now, as well as a "fixed" file name so if you did just want to always save to the same filename you could.
Jane, yes that would be a nice addition. I would use it to start where I left off each time and wouldn't really need the persons name in the file name.

Thanks

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 10 Aug 2017 17:53

Assuming the desire to open FH in the Focus Window or the Records Window is reflected in the Tools > Preferences > Startup > Display the Records Window option, then the Registry Key HKEY_CURRENT_USER\Software\Calico Pie\Family Historian\2.0\Preferences\Rec Win Startup value of True or False could automatically choose the INI file Window mode.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 10 Aug 2017 18:12

Actually if you don't specify the window, I think it uses the default anyway.

I will have a play, but probably won't be tonight.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 10 Aug 2017 18:20

You are correct Jane, but then it IGNORES the Record= option!
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Quick Link Creator

Post by Valkrider » 11 Aug 2017 13:49

I just thought that I would give this plugin a try in PlayOnMac.

It creates a Mac desktop shortcut but as it is a .cmd file the Mac doesn't know what to do with it.

Just FYI not criticising.

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 11 Aug 2017 15:07

Colin, is there an equivalent batch command file language for Mac that could be used instead?
All it is actually doing is copying some text to a plain text fhini.ini file and then running FH with some command line options.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Quick Link Creator

Post by Valkrider » 11 Aug 2017 15:15

Mike

It will be a bit more complicated than that as the Mac has no concept of drive letters which are included in the paths in the cmd file.

What it may be possible to do is to create a startup application in PlayOnMac, I will have a look into that.

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 11 Aug 2017 15:27

Colin, is there somewhere in the PlayOnMac PC environment that the batch CMD file can be saved instead of the Mac Desktop, because within that PC environment drive letters are understood otherwise the Plugins and Batch scripts employed with Ancestral Sources Data Entry and Backup and Restore FH Settings would never run at all.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 11 Aug 2017 15:59

@Valkrider - I suspect it might be possible to create a mac template file fairly easily if you can tell me what needs to be in there.

I have added a popup selection screen which shows the currently selected record with a button to change it.

It defaults to the "Launch Family Historian" option, but you can change it to named files, it also defaults to the current start up workspace using Mikes read of the registry.

It puts the focus on the Create button so running and pressing enter twice will update the Launch script on the desktop.

I have not changed the name yet. So now it's mostly function complete, what should it be called?
Last edited by Jane on 11 Aug 2017 17:42, edited 1 time in total.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 11 Aug 2017 16:26

To differentiate between running in genuine Windows or in PlayOnMac or Crossover use the following Plugin script:

Is_Windows = true -- Windows v PlayOnMac/Crossover/Wine
if fhGetPluginDataFileName("LOCAL_MACHINE"):lower():match(":\\users\\public\\") then Is_Windows = false end

Then test if Is_Windows then <use CMD template> else <use Mac template> end

That is the technique I use in my Plugins to determine the Windows versus Mac environment.
It relies on Mac using the C:\Users\Public\Application Data\... path instead of C:\ProgramData\... path.
See glossary:family_historian_program_data_folder|> Family Historian Program Data Folder.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 11 Aug 2017 17:29

Just noticed a bug as the screen does not refresh correctly when you select a different record, new version below
Quick Link Creator.fh_lua
(7.18 KiB) Downloaded 214 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Quick Link Creator

Post by Valkrider » 11 Aug 2017 17:53

Jane

Looking at PlayOnMac it is possible to create another shortcut on the POM desktop to another programme.

As a result if for the Mac version the ini file and cmd file can be written to the FH or Calico Pie folder instead then it looks like it might be possible to create the shortcut to an individual.

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 12 Aug 2017 09:54

Colin, do you think you would have use for the plugin, if so where would you like the file put.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Quick Link Creator

Post by Valkrider » 12 Aug 2017 10:41

Jane

Yes I would use it as I have about 20 different projects in FH. As a result what about storing them in the Export folder of the project.

What it would mean for me is getting back to an individual who is not necessarily the root person, this is particularly relevant for me where I have a Surname study with one project per country and the root person is not really relevant.

User avatar
zoomdoggies
Gold
Posts: 26
Joined: 25 Apr 2014 21:27
Family Historian: V6.2
Location: Seattle, Washington, USA

Re: Quick Link Creator

Post by zoomdoggies » 12 Aug 2017 23:09

Thanks for sharing, Jane. This will be a handy way to pick up where I left off.

The plug-in, as written, whined about not being able to find my Family Historian executable – don't know why not, since it was installed in the default place – but I hardcoded the path and it works like a champ. ;)

– Teri

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 13 Aug 2017 09:18

I have added some code to try and support putting the file in the Project Public folder for Mac and also added a fall back check for Family Historian if the registry key read fails.
Quick Link Creator.fh_lua
(7.83 KiB) Downloaded 132 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Quick Link Creator

Post by Valkrider » 13 Aug 2017 09:39

Jane

Thanks for this but still not working for the PlayOnMac version I am afraid.

Could the ini file also be written to the same folder as the cmd folder rather than the temp folder? I don't think that the ini file is being created as I can find no trace of it on my HDD.

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Quick Link Creator

Post by tatewise » 13 Aug 2017 09:42

Teri, can you give more details about how the Plugin 'whined' and what path details are involved.
I wonder if FH needs to be reinstalled to correct the Windows Registry entry?
What version of Windows are you running? (Vista, 7, 8.1, 10, and is it 32-bit or 64-bit)

Jane, isn't it odd that that the Registry Key Read would not work?

Note that the default path on 32-bit PC will be C:\\Program Files\\Family Historian\\program\\fh.exe

You could also try Registry Key:-
HKLM\SOFTWARE\Calico Pie\Family Historian\2.0\Program Files Dir and append fh.exe
which must be accessible from FH as that is where it saves some Preferences.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Quick Link Creator

Post by Jane » 13 Aug 2017 10:14

Colin, if you edit the batch file to use another folder does it then write the file, or is >> not supported in the emulator?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

Post Reply