Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

If neither of those of work for you, you can donate any amount by clicking here.

How to start PinballX with Favorites instead of All tables


Recommended Posts

Posted

Hi

I've been running with PinballX for a while now in my cabinet - and I'm finally getting around to getting it the way I'd like, so even my kids can use it...

When my cabinet starts, it starts with "All Tables" - I would instead like it to start with the "Favorites" list - is that possible?

I thought maybe a commandline option - there doesnt seem to be a setting anywhere for this that I can find. Or may be an AHK to do the job as a last resort..

I'm running the latest version - 5.19

thanks

Posted

I never checked it, but thought that PinballX shows the list at start, when it was closed.

Maybe not for favorites.

You can create a filter as well where you have your favorites tables in.

I thought it could start with a filter as well.

I will check the cabinet later today when I'm home to check the behavior of the favorite list (and filter)

Posted

Hi Mike -

After your post above I did some tests my end.

Turns out PinballX DOES record and set the last list or system you had - so it will start up with that list or system on next startup - including favourites.

But - and here's the big but - instead of recording it at the time its set, PinballX only records the current active list/system when you exit cleanly via the menus. (ie, ESC, then select "reboot", "exit", or "shutdown").

However - if you shutdown (like everyone in my house does) by hitting the momentary switch at the base of the cabinet (which causes windows to shutdown cleanly, but force terminates anything running) - it will NEVER set this. So that's why on my cabinet it always starts on "All Tables" - no matter what it was on last time it was used.

 

Now that I know it works this way, I have a good workaround - because I can set it to favourites, restart via PinballX - and then forever after it will stay on favourites on bootup, even if someone changes it last time the cabinet was used... Thats a win for me.... :banana:

But perhaps a nice feature might be an option in PinballX to start on a specific list or system regardless of what it was last time you cleanly exited? Just a thought.

thanks.

  • Like 1
Posted

I'm like a dog with a bone - I cant let stuff go -

So - I coded a solution - for anyone else in my situation and wants to boot with "Favourites" on, regardless of what you had last run -

I created a simple AHK - that needs to run before PinballX - so I put it in the PinballX.bat file like so  :

start /min set_favs.exe
start "" pinballx.exe

The set_favs.ahk AHK looks like this, and has to be compiled - we need to modify the PinballX ini file before PinballX runs, which is why we have to use the .bat file .

FileRead, configfile, c:\PinballX\Config\PinballX.ini
if not ErrorLevel  ; Successfully loaded.
{
      found:=regexmatch(configfile,"filter_favorites=False")
      if ( found > 0 )
      {
           StringReplace, configfile, configfile, filter_favorites=False , filter_favorites=True
           configfile:=RegExReplace(configfile, "filtername=(.*)" , "filtername=Favourite Tables")
           configfile:=RegExReplace(configfile, "lastselected=(.*)" , "lastselected=")
           FileMove, c:\PinballX\Config\PinballX.ini, c:\PinballX\Config\PinballX.bak, 1
           FileAppend, %configfile%, c:\PinballX\Config\PinballX.ini
	   DllCall("FlushFileBuffers")
      }
}

ExitApp

This all presumes your PinballX install is in c:\PinballX

 

And thats it - Favourites will always be set on boot, or restart, regardless. 

Just watch "Favourites" spelling. I'm in the UK, so I use British spelling. I've changed it in the settings to use the correct local spelling - so if you use this, and you are in the US, make sure you change "Favourite" in the code above to "Favorite"

  • Like 2
Posted
19 minutes ago, eustonr said:

Just watch "Favourites" spelling. I'm in the UK, so I use British spelling.

The correct spelling! :D

 

Just a thought, but you might also be able to just set the pinballx.ini file as read only instead so the last selected list doesn't get updated on exit. Obviously you'd need to remember to change it back if you wanted to change any of your config settings. Should work (but not tried it).

  • Haha 1
Posted

Nice solution.

But, i just learned my grandkids, to use the shutdown option in exit menu.

They know, when they do a hard power off the cabinet that grandpa get grumpy and they are not allowed to touch the cabinet for a while :D

3 hours ago, eustonr said:

Just watch "Favourites" spelling. I'm in the UK, so I use British spelling. I've changed it in the settings to use the correct local spelling - so if you use this, and you are in the US, make sure you change "Favourite" in the code above to "Favorite"

Tell me about it !

Check the main screen of Databasemanager and you see the favourites as well. Set the language to US and it is 'favorites' again.

Thats what you get when programing with an UK guy (otherwise you should only have Denglish words :P)

  • Haha 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...