Scripting Functionality Thread (NO Script Requests Here!)
Re: Scripting Functionality Thread (NO Script Requests Here!)
No, OnStop is fired when the stop button is clicked. The only way to do this currently would be to use the OnPlay and keep a note of the previous track each time. Of course this won't work for the very last track, so your request for a new event is probably necessary for this to work 100%.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Re: Scripting Functionality Thread (NO Script Requests Here!)
Thanks for the followup -- I guess I'll just stick to polling for now....
Re: Scripting Functionality Thread (NO Script Requests Here!)
@PartialGestalt
There is no dedicated Event for On TrackEnd But Here is how I solve that using Both Stop And Play.that way it will always do function on last played track.
There is no dedicated Event for On TrackEnd But Here is how I solve that using Both Stop And Play.
Code: Select all
Public CacheTrackInfo
Set CacheTrackInfo = Null
Function OnPlayStop
If Not (CacheTrackInfo = Null) Then
' First Do whatever it is needed to do on Track End
CacheTrackInfo = Player.CurrentTrack
Else
CacheTrackInfo = Player.CurrentTrack
end if
End Function
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: Scripting Functionality Thread (NO Script Requests Here!)
Event to add custom menus to nodes
Although this has been discussed here I don't think it was added to this thread
Although this has been discussed here I don't think it was added to this thread
-
- Posts: 1321
- Joined: Thu Jun 15, 2006 3:26 pm
- Location: Geelong, Victoria, Australia
Re: Scripting Functionality Thread (NO Script Requests Here!)
Access to the main track window column sorting criteria
My script can switch between sets of column postion / hidden/visible but their sort status is not available?
My script can switch between sets of column postion / hidden/visible but their sort status is not available?
Re:
What is the status on this? I would really like to have this functionality as well. I've also made an album art browsing docking panel and would like to fill the main tracks window with all the tracks of the selected album without having to jump to a node.DaledeSilva wrote:in the wishlist, this is mentioned:
::SDBTracksWindow
Clear method
I too would like to be able to do SDB.MainTracksWindow.Clear
at the moment you can add tracks to the window WITHOUT moving to a new node.. and you can remove selected... but you can't create a completely new list WITHOUT moving to a new node.
Re: Re:
How about:flashk wrote:What is the status on this? I would really like to have this functionality as well.DaledeSilva wrote:I too would like to be able to do SDB.MainTracksWindow.Clear
Code: Select all
Dim oShell
Set oShell = CreateObject("WScript.Shell")
oShell.SendKeys "^a"
SDB.ProcessMessages
SDB.MainTracksWindow.RemoveSelectedTracks
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
Re: Re:
Thanks, but the MainTracksWindow will not have input focus when I want to to clear the list, so the Ctrl + A keystroke will not be sent to it. Having a Clear method, as many other people have requested, would be the easiest solution.ZvezdanD wrote:How about:Code: Select all
Dim oShell Set oShell = CreateObject("WScript.Shell") oShell.SendKeys "^a" SDB.ProcessMessages SDB.MainTracksWindow.RemoveSelectedTracks
Re: Scripting Functionality Thread (NO Script Requests Here!)
I haven't tried this but it should work if you go to a node which clears the MainWindow.
Something like:
But I agree that we should have a proper Clear method
Something like:
Code: Select all
SDB.MainTree.CurrentNode.NodeType = 12 'Library
SDB.MainTracksWindow.Refresh
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: Re:
Yeah, I agree, but there are many more important things in API that are waiting on a queue for a long time. Let's face it, MM developers don't listen scripters at all. When some of them answered to someone in this forum last time (beside of Peke who is also very rarely here)? When they are updated their API last time, beside of two or three not so very significant methods/properties? Here are only changes for several years: ActiveFilterQuery, GetFilterQuery, rather pathetic SDBUIMultiLineEdit and ... I think there is no more.flashk wrote:Having a Clear method, as many other people have requested, would be the easiest solution.
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
Re: Scripting Functionality Thread (NO Script Requests Here!)
Thanks for the tip Bex! The code you posted works, but you need to restore the NodeType after adding the tracks to the window. Here is the final code I use to clear the main tracks window without jumping to a different node:Bex wrote:I haven't tried this but it should work if you go to a node which clears the MainWindow.
Something like:But I agree that we should have a proper Clear methodCode: Select all
SDB.MainTree.CurrentNode.NodeType = 12 'Library SDB.MainTracksWindow.Refresh
Code: Select all
' Save current node type
originalNodeType = SDB.MainTree.CurrentNode.NodeType
' Clear current tracks from window
SDB.MainTree.CurrentNode.NodeType = 12
SDB.MainTracksWindow.Refresh
' Add my own tracks
SDB.MainTracksWindow.AddTracksFromQuery "some query"
SDB.MainTracksWindow.FinishAdding
' IMPORTANT!! Restore original node type
SDB.MainTree.CurrentNode.NodeType = originalNodeType
Re: Scripting Functionality Thread (NO Script Requests Here!)
Ability to add add a track to SDBTracksWindow via song ID (instead of just ISDBSongData). It would work like AddTrackById for ISDBPlaylist.
MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.
Re: Scripting Functionality Thread (NO Script Requests Here!)
@flashk,
Cool!
@twinbee,
That already possible:
SDB.MainTracksWindow.AddTracksFromQuery("WHERE Songs.ID=" & SongsID)
http://www.mediamonkey.com/wiki/index.p ... sFromQuery
Cool!
@twinbee,
That already possible:
SDB.MainTracksWindow.AddTracksFromQuery("WHERE Songs.ID=" & SongsID)
http://www.mediamonkey.com/wiki/index.p ... sFromQuery
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: Scripting Functionality Thread (NO Script Requests Here!)
Wouldn't that be slower though, considering it has to scan through the whole database looking for the correct ID?That already possible:
SDB.MainTracksWindow.AddTracksFromQuery("WHERE Songs.ID=" & SongsID)
Then again, maybe that's what AddTrackById does anyway (I initially thought it was more direct). I imagine that adding through ISDBSongData will be much quicker in that case.
MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.
Re: Scripting Functionality Thread (NO Script Requests Here!)
No, SDB.MainTracksWindow.AddTracksFromQuery() is the fastest way to add tracks to the main window, as long as you don't have slow SQL's.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts