Page 5 of 13
Posted: Sat May 06, 2006 12:33 pm
by jiri
Could there be an event (similar to OnTrackProperties) which would be triggered when tracks where added to the library, either by a rescan or by file monitor?
I'm also having trouble with my OnTrackProperties event because I really want it to be triggered not only when the track properties window is used, but also when a track's properties are updated by a script. Would it be possible link this with the current event, or possibly a new event?
Both will be in the next release.
Jiri
Posted: Mon May 08, 2006 6:24 am
by trixmoto
By "next release" do you mean 2.6?
Posted: Mon May 08, 2006 9:35 am
by jiri
No, by next release I mean the next release of the current version (i.e. 2.5.3). Actually, it already is in just released RC.
Jiri
Posted: Mon May 08, 2006 3:35 pm
by trixmoto
Excellent, do you have any details on usage? Sample code?
Posted: Mon May 08, 2006 4:37 pm
by jiri
I'll upload updated help file soon. Here is a sample testing script:
Code: Select all
Sub OnStartup
Script.Include "Auto\Test incl.vbs"
Script.RegisterEvent SDB, "OnShutdown", "SDBShutdown"
Script.RegisterEvent SDB, "OnTrackProperties", "SDBTrackProperties"
Script.RegisterEvent SDB, "OnPlay", "SDBPlay"
Script.RegisterEvent SDB, "OnPause", "SDBPause"
Script.RegisterEvent SDB, "OnSeek", "SDBSeek"
Script.RegisterEvent SDB, "OnBeforeTracksMove", "Move"
Set Tmr = SDB.CreateTimer( 10000) ' Pop up a message in 10 seconds
Script.RegisterEvent Tmr, "OnTimer", "TestTimer"
Script.RegisterEvent SDB, "OnTrackConverted", "Converted"
Script.RegisterEvent SDB, "OnTrackAdded", "Added"
'"Converted"
End Sub
Sub Added( Track)
SDB.MessageBox "New track " & Track.Path, mtInformation, Array(mbOk)
End Sub
Sub SDBSeek
SDB.MessageBox "Seek made", mtInformation, Array(mbOk)
End Sub
Jiri
Posted: Sun May 14, 2006 3:25 pm
by Steegy
The "Scripting Functionality Wishlist" (
http://www.mediamonkey.com/forum/viewtopic.php?t=7978 ) has been updated with the "most doable" wishes from this discussion thread.
Thanks to
Lowlander for doing this for me!
Feedback/additions/... are always welcome of course.
All wishes from the previous wishlist version seem to be implemented (thanks to
the dev's for that!) and have been removed from the list.
Cheers
Steegy
Posted: Thu May 25, 2006 6:20 pm
by Steegy
Would it be possible to include a combobox control to the scripting ui possibilities? (I mean, the ListBox kind of thing, but with the list always open). If possible specifiable with or without input box.
I would like "automatic item locating by keyboard input" (like this is possible in the main tree: typing something goes to the specified node) for both the ListBox control and the ComboBox control.
BTW: I'm working on a "new style library" script that will have the same functionality of the library in Winamp, JRiverMC, ...
Now I'm using listboxes, but I miss comboboxes a lot.
The SDBTracksWindow.Clear method is needed too...
Cheers
Steegy
Posted: Fri May 26, 2006 9:38 am
by jiri
Do you mean SDBUIDropDown?
Jiri
Posted: Fri May 26, 2006 9:40 am
by Steegy
Sorry to be confusing. I just checked MSVC# to get the right names for the controls:

The ComboBox 'DropDown(List)' is the control that is available already.
I'd like the ListBox from the picture too.
(And both controls with AutoComplete (optional?) and "SelectItemWhileTyping" would be nice.)
Cheers
Steegy
Posted: Sat May 27, 2006 6:09 am
by Steegy
There's an inconsistency in the OnStop/OnPlay events when a song is "suspended" while tags are been written. I don't know if this should be considered as a bug, so I posted it here.
Please see
http://www.mediamonkey.com/forum/viewto ... 8298#48298
Posted: Sat May 27, 2006 10:16 am
by jiri
There are significant improvements planned in the next major version, so this should no longer be an issue.
Jiri
Posted: Sun May 28, 2006 3:55 pm
by Steegy
A remark (not very important for now):
Panels (Sheets) don't seem to have the new events (from the new event mechanism) yet.
The only way I know to assign events (the old ones) is through the constructor SDB.UI.AddOptionSheet(...)
Off-topic (just to make sure no-one else does the same): I'm working an an "advanced settings" panel that can be used by all scripts (especially those that don't require a separate options panel). It will give a list of all available settings, which you then can change very easily.
EDIT: Apperently the problem I had was due to an inaccessible variable. Trixmoto confirmed (below) that there is no problem. Thanks.
Posted: Sun May 28, 2006 4:03 pm
by trixmoto
The SpinEdit on my BrowseByArt script's option sheet has a MaxValue of 500 and works perfectly.
The advanced settings script sounds interesting. Is this reading all the options in from the ini file? Will it read/write the options in the [Scripts] section??
Posted: Sun May 28, 2006 5:54 pm
by Steegy
For obvious reasons, the script will read all keys in a cspecial category (only for this script). It will probably be called "AdvancedOptions".
I see you use my BrowseToNode method. Cool

.
Is there any way you can make your BrowseByArt script faster? I can't (don't want to) use it because it's much too slow.
If possible, I would also like to see a function added that can run/start _a function in an external (other) script_.
Addition: best not to throw an error if the external function doesn't exist
I would use this to make scripts aware that its settings have been changed (needed for some options on some scripts,e.g. to show/hide a context menu item without restarting MM).
Posted: Sun May 28, 2006 6:03 pm
by Big_Berny
Steegy wrote:If possible, I would also like to see a function added that can run/start _a function in an external (other) script_.
That would really be nice!