Giving it further thought, I
think that
all of the coding needed to do this* (and much more of course) is already encapsulated in @zvezdand's amazing '
FindCurrentPlayingTrack.mmip'
'FindPlaying' jumps to the relevant branch in the the requested node (library = location, MyComputer = FS I guess) so I had a peek @ the vbs. Alas, I'm not a coder, but it's beautifully commented, with logical naming conventions, and well structured.... (
Z ROCKS)
I was therefore easily able to browse the vbs and get a jist.
Sub FindCurrentlyPlayingTrack() deals with getting the Track.
(If I'm right), Lots of the code deals with basically getting the path of the item that's currently playing...
So we need a Dim, to store the path, like
Code: Select all
oSongData = SDB.Player.CurrentSong
The
SaveOptionSheet section implies that
FindMode '1' is the mode we'll be emulating:
Code: Select all
If oSheet.Common.ChildControl("FindInMyComputer").Checked Then
SDB.Objects("FindCurrentPlayingTrack").Item("FindMode") = 1
I THINK ZvezdanD starts with some error-checking re MM versioning (can anyone more experienced interpret/validate this script pls?)
Code: Select all
DB.ProcessMessages
sSongPath = oSongData.Path
If SDB.Objects("FindCurrentPlayingTrack").Item("FindMode") = 2 Then
If Not bNewVersion Then Exit Sub
bRefresh = True
I don't know what
SDB.ProcessMessages does but I guess that
sSongPath = oSongData.Path gets the target path from the 'object song path'
(earlier, line 444, I see
Set oSongData = SDB.Player.CurrentSong)
from line 468 I think is the desired operation being achieved in FindCurrentPlaying
Code: Select all
If SDB.Objects("FindCurrentPlayingTrack").Item("FindMode") = 1 Then
If Mid(sSongPath, 2, 2) = ":\" Then
sCaption = UCase(Left(sSongPath, 3)) & " [" & sCaption & "]"
sFolders = Mid(sFolders, 4)
End If
SDB.MainTree.Node_MyComputer.Expanded = False
SDB.MainTree.Node_MyComputer.Expanded = True
Set oCurNode _
= SDB.MainTree.FirstChildNode(SDB.MainTree.Node_MyComputer)
Obviously, some error checking and control building required, but I do think this is possible... if anyone can help at all, I think many might appreciate this added functionality (important q!!does this 'jump to path' behaviour already exist?! either in new MM or via an already developer script/extension?)
Thanks again
contributions welcome