Author Topic: Unique TP shortcuts for each database  (Read 3407 times)

0 Members and 1 Guest are viewing this topic.

Paul

  • Member
  • **
  • Posts: 21
    • View Profile
Unique TP shortcuts for each database
« on: 2014-05-23 17:38:19 »
Hi all,

I use four different TP databases and I would like to have a unique TP shortcut for each one so that I can start TP and open the desired database with one click. Right now TP always opens a default database and I have to go through the steps to open the desired one. Any ideas?

Thanks
Paul

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 915
    • View Profile
Unique TP shortcuts for each database
« Reply #1 on: 2014-05-24 11:14:45 »
You can specify the name of the database on the command line.

When you right-click on a shortcut and choose Properties, the 'target' field shows the command line.

It may currently say something like "C:\Program Files\Thumbs9\Bin\Thumbs9.exe" (including the quotes). Put the full path and filename to the database behind that (also within quotes if it contains spaces) and the shortcut should launch TP with that database when you try it next. For example:

"C:\Program Files\Thumbs9\Bin\Thumbs9.exe" "d:\photos\databases\1990-2000.tpdb8"

So, you could start by making four copies of your regular TP9 shortcut and then editing the 'target' of each one to launch a different database. Of course, you can edit the shortcut's name as well.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

Paul

  • Member
  • **
  • Posts: 21
    • View Profile
Unique TP shortcuts for each database
« Reply #2 on: 2014-05-24 12:50:01 »
I just want to say this to Daan:

You are so smart and so helpful. You have come to my rescue a number of times when I was at my wits end. Users like me are so lucky that you so generously share your time and knowledge with us.

I love Thumbs and I love people like you who make up the TP community. I just wish that I knew more so that I could contribute as well.

Paul

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 915
    • View Profile
Unique TP shortcuts for each database
« Reply #3 on: 2014-05-24 13:09:23 »
Aaw now you got me blushing.. :-)

Thank you for the very kind words.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

Paul

  • Member
  • **
  • Posts: 21
    • View Profile
Unique TP shortcuts for each database
« Reply #4 on: 2014-05-25 14:52:19 »
I created four shortcuts  with properties that point to the desired databases, but then a logical disconnect kicked in. It has to do with the Options - Preferences - Startup - Initial Database, which cannot be left blank. One must either select "Last Opened" or "Specific database" and neither works with multiple shortcuts because after I exit TP, the next time that I start TP it will automatically load the last opened database, or the Specific Database will be the wrong one for the other shortcuts.

TP should understand that if there is a database specified in the shortcut then that should override the one specified in Preferences. I don't see any way around this conflict as long as TP requires a Startup Preference database.

Maybe it is possible to install TP four times on one PC, with each install not sharing anything with the others installs, so that each time TP is run it doesn't have visibility to the Preferences of the other installs?

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 915
    • View Profile
Unique TP shortcuts for each database
« Reply #5 on: 2014-05-25 18:19:27 »
> [..] but then a logical disconnect kicked in.

That's weird, Paul.. are you sure that you specified a valid database on the command line (within quotes if necessary) and that TP had read/write access to it?

It seems to work fine here. I have created two shortcuts that each point to a different database. They work as expected regardless of the order in which I launch them, and that's with a thumbs.ini that specifies a different startup database.

However, in the [Startup] section of my Thumbs9.ini file, I also notice this setting:

SaveStartupDB=0  

..the name of which suggests that the currently used database won't be saved as the default startup database for the next time (I guess that's how the 'last used' option in Preferences | Startup was implemented.. if 'on', the value here would be '1'). Anyway, as said, my TP9 is configured to open a specific database at startup, and a database specified on the command line seems to override that without problem (I've tried this with build 3936 of early April).

As for the idea of multiple installations, that might not be possible due to a registry key that defines the folder where TP looks for its INI file (and so, you would still have only one .ini file). Another option might be to write four batchfiles, each of which copies one of 4 different ini files (each containing a different startup database setting) to thumbs9.ini and then launches TP. A drawback of that approach would be that any changes that you make to your preferences won't be preserved because the thumbs9.ini gets overwritten upon the next program launch. Still, from what my little experiments show, it shouldn't be necessary to resort to such an exotic solution.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

Paul

  • Member
  • **
  • Posts: 21
    • View Profile
Unique TP shortcuts for each database
« Reply #6 on: 2014-05-25 19:08:12 »
Daan,

You're right as usual. I use virtual drives whose drive letters change, but my shortcut is hard coded for a single drive letter.

I can't thank you personally for your great advice, so I will do the next best thing: for the next twelve months I will drink Dutch beer exclusively. Heineken, right?

Paul

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 915
    • View Profile
Unique TP shortcuts for each database
« Reply #7 on: 2014-05-25 20:05:56 »
Glad to hear that it works!

Yes, a Heineken in my honor would be great.. 'Proost'! :-)
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

billbremer

  • Member
  • **
  • Posts: 4
    • View Profile
Unique TP shortcuts for each database
« Reply #8 on: 2014-06-15 09:17:35 »
I'm trying to achieve this:

Clicking on shortcut A always opens database A looking at files in Folder A.
Clicking on Shortcut B always opens database B looking at files in Folder B.

Can anyone help with this?

Thanks

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 915
    • View Profile
Unique TP shortcuts for each database
« Reply #9 on: 2014-06-17 15:29:11 »
> I'm trying to achieve this:
>
> Clicking on shortcut A always opens database A looking at files in Folder A.
> Clicking on Shortcut B always opens database B looking at files in Folder B.
>
> Can anyone help with this?

I'm afraid that this isn't possible out of the box.. You can specify a database on the command line, but not a working folder (which is stored/defined in thumbs9.ini).

Theoratically, you could create two different thumbs9.ini files (which both would set up TP with a different startup folder and database) and store them as e.g. ini-A.txt and ini-B.txt. Then write two batchfiles that copy the corresponding ini-?.txt file over thumbs9.ini, and then launch TP. With that in place, you could create shortcuts to those batchfiles and they would do what you are trying to accomplish.

However, when you'd do anything that causes TP to update its INI file (e.g. a configuration change), that would no longer be remembered because you would be overwriting your .ini file everytime that you launch TP..
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.