monitoring current track without on_play
Moderators: Gurus, Addon Administrators
Re: monitoring current track without on_play
Based on the list posted by ZvezdanD here: http://www.mediamonkey.com/forum/viewto ... 31#p186831 there were many new events added in MM 3.1.0.1218. They are:
A2. New events OnDblClick, OnEnter, OnExit.
A4. New events OnShuffleClicked, OnRepeatClicked and OnNowPlayingModified.
A6. New events OnTrackListSelectionChanged and OnNowPlayingSelectionChanged.
A9. New event OnTrackEnd.
B1. New OnIdle event.
B5. New events OnOptionsChange and OnFilterChange.
B7. New events OnTrackListFilling and OnTrackListFilled.
Jiri
A2. New events OnDblClick, OnEnter, OnExit.
A4. New events OnShuffleClicked, OnRepeatClicked and OnNowPlayingModified.
A6. New events OnTrackListSelectionChanged and OnNowPlayingSelectionChanged.
A9. New event OnTrackEnd.
B1. New OnIdle event.
B5. New events OnOptionsChange and OnFilterChange.
B7. New events OnTrackListFilling and OnTrackListFilled.
Jiri
Re: monitoring current track without on_play
Jiri, thank you so much!
● 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: monitoring current track without on_play
Jiri, all of this added events are self explanatory, but I am not sure about OnTrackListSelectionChanged. Could you tell me if it fires when a selected (highlighted as someone is calling it) state are changed or whenever is some track added/removed?jiri wrote:A6. New events OnTrackListSelectionChanged and OnNowPlayingSelectionChanged.
If it means only on selected state, then this is not same as DaledeSilva's requests. Here is his post:
I think that you introduced too much confusion with a term "Current Selection" as it is posted by chrisjj in http://www.mediamonkey.com/forum/viewto ... =4&t=35966. To me a term "Selection" is about selected (highlighted) state of tracks, not their visible state.currently, previously OnChangedSelection has let a script know whenever the tracklist has changed because it usually only changes when a new node is navigated to.
Now, however, because a user can set search to "Current Selection" the tracklist can change without changing nodes and OnChangedSelection doesn't report (logically).
I would like a specific OnChange event for the tracklist window.
● 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: monitoring current track without on_play
OnTrackListSelectionChanged is fired when a track is selected or unselected in the tracklist. Note that this and all other new events are already documented in Wiki.
It seems that you are right, it doesn't really comply the original request. That said, as I test the current events, either these or for example OnTrackListFilled, it seems that they cover all necessities. In case there is some scenario missed, I'm open for adding some more events.
As for "Current Selection" term in UI - yes, it can cause some confusion, but as discussed in the thread, it's hard to find a good replacement. As for programmers/scripters, I suppose that terms like selection and focus and quite clear and well defined.
Jiri
It seems that you are right, it doesn't really comply the original request. That said, as I test the current events, either these or for example OnTrackListFilled, it seems that they cover all necessities. In case there is some scenario missed, I'm open for adding some more events.
As for "Current Selection" term in UI - yes, it can cause some confusion, but as discussed in the thread, it's hard to find a good replacement. As for programmers/scripters, I suppose that terms like selection and focus and quite clear and well defined.
Jiri
Re: monitoring current track without on_play
Good to know that. I like to have such event, even if I don't need it in this moment.jiri wrote:OnTrackListSelectionChanged is fired when a track is selected or unselected in the tracklist.
You are right, it seems that OnTrackListFilled could be used in DaledeSilva's case.
● 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: monitoring current track without on_play
Jiri, just one more question about OnTrackListSelectionChanged. I just tried it and I have following scenario:
1. click on some node which has tracks, tracklist is populated with those tracks, first track is selected by MM automatically and mentioned event fires.
2. click on some another node which also has tracks -> everything is same as in previous case.
3. click on some node which don't contain any track -> tracklist is empty and mentioned event doesn't fires.
I think it should fire in the third case too, since selection is changed as it is in the second case.
1. click on some node which has tracks, tracklist is populated with those tracks, first track is selected by MM automatically and mentioned event fires.
2. click on some another node which also has tracks -> everything is same as in previous case.
3. click on some node which don't contain any track -> tracklist is empty and mentioned event doesn't fires.
I think it should fire in the third case too, since selection is changed as it is in the second case.
● 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: monitoring current track without on_play
Well, it depends on how you look on it, internally it works so that the items are first destroyed and so they don't lose select status. However, you can use OnChangedSelection event which is fired anytime anything changes in MM UI (focused control, selected items, etc.) and this actually is a superset of OnTrackListSelectionChanged event.
Jiri
Jiri
Re: monitoring current track without on_play
Thanks for the events and feedback Jiri!
New script: Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page
-
- Posts: 401
- Joined: Thu Sep 27, 2007 4:19 pm
- Location: Connecticut
Re: monitoring current track without on_play
I also want to say thanks for all these great events!!!
Ray
Ray
Re: monitoring current track without on_play
Jiri, I have one more request. I need OnMouseDown and OnMouseUp events, especially needed for the button controls. In my scripts I have two buttons, "Up" and "Down", for moving items in a list. I need to click for every item to traverse through list which is really boring, especially for longer movements. If I have OnMouseDown/OnMouseUp, I could click on specific button just once, like with the up/down (spin) control.
Well, when I think more about it, I need also OnKeyDown and OnKeyUp for same purpose. And please don't forget about OnSelect event for Edit/MultilineEdit controls.
Well, when I think more about it, I need also OnKeyDown and OnKeyUp for same purpose. And please don't forget about OnSelect event for Edit/MultilineEdit controls.
● 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: monitoring current track without on_play
Thanks, you seem to have covered all the bases (and a few more!)
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.