HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: TakuSkan on 2013-02-15 22:33:24

Title: Have focus on track in Columns UI at launch
Post by: TakuSkan on 2013-02-15 22:33:24
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:

(http://oi46.tinypic.com/2n6b2ft.jpg)

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?

(http://oi47.tinypic.com/2m0238.jpg)

This one has totally escaped me through the years, and I've come to think it's not possible.
Title: Have focus on track in Columns UI at launch
Post by: trout on 2013-02-16 01:46:23
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.

Title: Have focus on track in Columns UI at launch
Post by: TakuSkan on 2013-02-21 09:41:32
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.