Scripting Functionality Thread (NO Script Requests Here!)

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Fellow scripters/coders/...: Do you feel the need for a wishlist for enhanced scripting functionality?

You may select 1 option

 
 
View results

jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post 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
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

By "next release" do you mean 2.6?
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.
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post 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
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Excellent, do you have any details on usage? Sample code?
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.
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post 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
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post 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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post 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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Do you mean SDBUIDropDown?

Jiri
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Sorry to be confusing. I just checked MSVC# to get the right names for the controls:

Image
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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post 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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

There are significant improvements planned in the next major version, so this should no longer be an issue.

Jiri
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post 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.
Last edited by Steegy on Sun May 28, 2006 4:09 pm, edited 1 time in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post 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??
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.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post 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 :D.
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).
Last edited by Steegy on Sun May 28, 2006 6:18 pm, edited 1 time in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post 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!
Post Reply