Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Have focus on track in Columns UI at launch (Read 1859 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Have focus on track in Columns UI at launch

This is something I haven't found any solution for for years.  I'm setting up FB2K for a friend, want it to look nice, and I'd like to get some feedback on if this might actually be possible.

I have artwork view and item details panels stacked on the left, and lyrics and columns ui panels stacked on the right.  But when FB2K launches, no track is ever selected in the playlist, and it looks like this:



Is it possible to exit FB2k, and then when it's started again, force the focus on the last track in columns ui that was played before FB2K was shut down?  So it boots up looking like this?



This one has totally escaped me through the years, and I've come to think it's not possible.
Geopoliticus Child Watching the Birth of the New Man

Have focus on track in Columns UI at launch

Reply #1
I'm assuming you don't necessarily want it to automatically start playing upon launch. Unfortunately I know of no other way to do this with a native component / setting / command.

But you could launch with a script, and use it to auto send keystrokes to accomplish the track selection / highlighting.

Quote
Set sh = WScript.CreateObject("WScript.Shell")
sh.Run("""C:\Program Files\foobar2000\foobar2000.exe""")
WScript.Sleep 500
sh.SendKeys "{Up}"
WScript.Sleep 100
sh.SendKeys "{Down}"
WScript.Sleep 100
Set sh = Nothing

*Note - Adjust program path as necessary. Sleep delays may also need to be adjusted to suit. Especially the first delay, depending upon how long it takes your fb2k to start up.

What it does is launch the program and then simulates up and down arrow keystrokes. It works for me, but then I must warn that I am not a scripting genius. I'm not sure if your system or configuration being different will be a problem. Hopefully the playlist will have focus upon launch for you also.


 

Have focus on track in Columns UI at launch

Reply #2
Wow... works like a champ trout!  I just had to tweak the sleep delay a bit as my systems seem to boot a bit slower.  But FB2K starts up, and as you've got it set up, the cursor moves up and down almost imperceptibly to activate other panels.

Funny though...  I have 2 portable copies of FB2K I made on other systems at different times, each a bit different.  And for some reason one of them starts up with the album art panel displaying fine.  No need for the VB script.

Sorry for being so long getting back to this.  Lots of distractions these daze. 

Thanks so very much for your input on this trout.
Geopoliticus Child Watching the Birth of the New Man