Scripting Functionality Thread (NO Script Requests Here!)
Where would you get the previous value from?
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.
-
- Posts: 1017
- Joined: Wed Mar 01, 2006 1:09 am
- Location: In a jungle down under
- Contact:
I don't know!!!!
Don't even know what you want that for. You mentioned that you wanted to prevent a routine to be run if there was no changes in a particular field.
I was thinking along the lines that you have run the routine one time already, and if the user change a particular field value, you want to run it again.
That is how I understood it. What about simply collecting before values first time, and use them later to prevent double routine.
BTW, I'm a tad afraid of being stuck with 2.5.2 for the next year or whatever. A before track collection would require another big task to be performed whenever a user want to change a large amount of songs, which is one of the brilliant points with MediaMonkey. I'd hate to loose that. I partly feel I'm loosing that part with MediaMonkey already.
Don't even know what you want that for. You mentioned that you wanted to prevent a routine to be run if there was no changes in a particular field.
I was thinking along the lines that you have run the routine one time already, and if the user change a particular field value, you want to run it again.
That is how I understood it. What about simply collecting before values first time, and use them later to prevent double routine.
BTW, I'm a tad afraid of being stuck with 2.5.2 for the next year or whatever. A before track collection would require another big task to be performed whenever a user want to change a large amount of songs, which is one of the brilliant points with MediaMonkey. I'd hate to loose that. I partly feel I'm loosing that part with MediaMonkey already.
-
- Posts: 906
- Joined: Sun May 28, 2006 4:22 am
- Location: Australia
- Contact:
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.
also.. while you can remove selected tracks (SDB.MainTracksWindow.RemoveSelectedTracks).. (this is visually only btw)... you can't remove specific/arbitrary tracks... I would like to be able to cycle through all tracks currently visible and hide those that don't meet certain criteria.
This would not only allow me to add an ability in my album art browser script (in development) to filter out the songs in the current node that are related to the album just clicked on... but it would also allow the writing of a much better search option (I'd call it 'filter') that would allow you to search only within the current node - this is how I think search should be working anyway).
Lastly.. I would like to be able to detect what column a user last clicked on in the tracklist.
Imagine clicking a column and then clicking a button and the columns string is automatically used for something else (like a search or above mentioned filter).
This idea actually stems from another mp3 database I used called Mexp for winamp in which you could ctrl-right click on a column to do the same... this was fantastic)
Dale.
::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.
also.. while you can remove selected tracks (SDB.MainTracksWindow.RemoveSelectedTracks).. (this is visually only btw)... you can't remove specific/arbitrary tracks... I would like to be able to cycle through all tracks currently visible and hide those that don't meet certain criteria.
This would not only allow me to add an ability in my album art browser script (in development) to filter out the songs in the current node that are related to the album just clicked on... but it would also allow the writing of a much better search option (I'd call it 'filter') that would allow you to search only within the current node - this is how I think search should be working anyway).
Lastly.. I would like to be able to detect what column a user last clicked on in the tracklist.
Imagine clicking a column and then clicking a button and the columns string is automatically used for something else (like a search or above mentioned filter).
This idea actually stems from another mp3 database I used called Mexp for winamp in which you could ctrl-right click on a column to do the same... this was fantastic)
Dale.
Product Designer & Indie Developer.
Building at the intersection of motion, art, and code.
Find me on twitter and all the other ones here.
Building at the intersection of motion, art, and code.
Find me on twitter and all the other ones here.
Any update on these....
Any update on the following?
tj_junk
Posted: Thu Apr 13, 2006 6:33 pm Post subject: Run "Auto-Organize" or "Tag from Filename&quo
--------------------------------------------------------------------------------
I would like to be able to run "Auto-Organize" or "Tag from Filename" within a script.
[...]
Steegy
Posted: Thu Apr 13, 2006 10:10 pm Post subject:
--------------------------------------------------------------------------------
I think a MediaMonkey'ed replacement for the "web page based track changes preview" (as used in Case Checker, and several other scripts) would be nice.
As I see it, a script would call a built-in window with a listview (like Auto-Organise and Auto-Tag from Filename) and give it a "current" and a "new" list (of songs) as input.
In the dialog, the user would see the changes marked in yellow (differences between "current" and "new"/"result"), and would be able to change the results.
When the user clicks OK to accept and close the dialog, the script would get a "result" list of songs back.
With these results, songs could be renamed or maybe something else could be done, within the calling script.
So basically, I want to say that tj_junk is not the only one with such idea.
It would be a nice thing to have, but it's certainly not "urgent" as I see it.
It would make the preview functionality/code in tag-changing scripts *much* cleaner (most such scripts contain 90% standard preview code, and only about 10% of real programming!) and adaptable (let the user show the columns he/she wants), _and_ the results can actually be modified too.
cycle album art wish
Hi developers,
In this topic http://www.mediamonkey.com/forum/viewtopic.php?t=13300 I placed a small script to cycle through the pictures of a track. It would be better not to use my method (updating the track and change the order of the picture) but to use the right click menu of the "playing now" window. Hence the wish to get access by scripting to that menu or even better, but of course a major remake, get access to all menu's and available commands through scripting.
Thanks.
Wim
In this topic http://www.mediamonkey.com/forum/viewtopic.php?t=13300 I placed a small script to cycle through the pictures of a track. It would be better not to use my method (updating the track and change the order of the picture) but to use the right click menu of the "playing now" window. Hence the wish to get access by scripting to that menu or even better, but of course a major remake, get access to all menu's and available commands through scripting.
Thanks.
Wim
@jiri: Wim needs a way to change the displayed album art image displayed in the Album Art panel, through a script (e.g. to automically go through all its attached album art images, if a file is selected)
I think this has been asked before, but I'd like OnChange events for the Edit and SpinEdit (and maybe other) controls.
I think this has been asked before, but I'd like OnChange events for the Edit and SpinEdit (and maybe other) controls.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Shareaza uses a nice way to change the program's most advanced settings without having to edit registry setting, ini files, ... .
Based on that idea, I started a script (way back in time) that is used to visualise and edit advanced script settings (for different scripts) in a standard way. It uses a "shared" ini section and looks like this for one single test script that uses it:
What happened:
A script called "Test" uses parameters Enabled (boolean: value False), Number (integer: value 100, min 0, max 9999999) and Text (string: value This is a piece of text).
The script initialises these parameters using(to exclude all programming errors on the "client side", explicitly stating the parameter type (Bool, Int, String) is required)
The "Optional" part means that these values will only be written (made) if they don't already exist. They are default script values if the script hasn't run before.would then query the value of the Enabled parameter, for use in the script.
Looking at it now, a better method would be to also havei.e. 2 methods in one. This method would make a ini entry if it doesn't exist yet, and return the default value. If the ini entry already exists (no matter what value), that value would be returned.
Screenshot of the advance options panel:
Scripts could register an event to be notified for changes to their settings, made by this panel.
To be useful, every script that uses this "advanced script options" panel would like to use easy Set/Get methods to interact. This can be done by including necessary code, but it'd be better if everything can be done using e.g. the Script object (SDBScriptControl).
Is this interesting enough to include this "now script thing" in the MM program itself?
Based on that idea, I started a script (way back in time) that is used to visualise and edit advanced script settings (for different scripts) in a standard way. It uses a "shared" ini section and looks like this for one single test script that uses it:
Code: Select all
[AdvancedOptions]
Test.Enabled=Bool|False
Test.Number=Int|100%0%9999999
Test.Text=String|This is a piece of text
_ScriptPath.Test=C:\Program Files\MediaMonkey253RC4\Scripts\Auto\AdvancedOptions.vbs
A script called "Test" uses parameters Enabled (boolean: value False), Number (integer: value 100, min 0, max 9999999) and Text (string: value This is a piece of text).
The script initialises these parameters using
Code: Select all
Dim ScriptName : ScriptName = "Test"
Call SetSettingValueOptional(ScriptName, "Enabled", "Bool", "False")
Call SetSettingValueOptional(ScriptName, "Number", "Int", CreateIntSettingValue("100", "0", ""))
Call SetSettingValueOptional(ScriptName, "Text", "String", "This is a piece of text")
The "Optional" part means that these values will only be written (made) if they don't already exist. They are default script values if the script hasn't run before.
Code: Select all
Dim pEnabled : pEnabled = GetSettingString("Test", "Enabled")
Looking at it now, a better method would be to also have
Code: Select all
Dim pEnabled : pEnabled = SetSettingValueOptional(ScriptName, "Enabled", "Bool", "False")
Screenshot of the advance options panel:
Scripts could register an event to be notified for changes to their settings, made by this panel.
To be useful, every script that uses this "advanced script options" panel would like to use easy Set/Get methods to interact. This can be done by including necessary code, but it'd be better if everything can be done using e.g. the Script object (SDBScriptControl).
Is this interesting enough to include this "now script thing" in the MM program itself?
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Makes sense, I'll see what can we do about it for the next version.@jiri: Wim needs a way to change the displayed album art image displayed in the Album Art panel, through a script (e.g. to automically go through all its attached album art images, if a file is selected)
They already have this event, doesn't it work for you?I think this has been asked before, but I'd like OnChange events for the Edit and SpinEdit (and maybe other) controls.
Would it mean to include some 'xxx.vbs' file with MM installer so that other scripts could include it? In such case it would probably make sense to do so...Is this interesting enough to include this "now script thing" in the MM program itself?
Jiri
Ah ok. They weren't documented so I didn't know they already existed.They already have this event
Code: Select all
Script.RegisterEvent TestEdit, "OnChange", "TestEdit_OnChange"
Sub TestEdit_OnChange(Edit)
MsgBox "123"
End Sub
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
I have two wishes:
1. In ISDBTreeNode:
- BackToPreviousNode
- ForwardToPreviousNode
(Like pressing alt+right/left.)
2. ISDBUISingleDateTimeBox and ISDBUIDateTimeRangeBox (They could perhaps be combined into one)
With members like
- HideTime
- DefaultValue
+ more?
This assumes that MM implements a DateTimeInputBox which is to be used in various places where a single date or date range should be given. (e.g. Dateadded, Timestamp and Lastplayed in auto-playlists & advanced searches)
e.g. (Without time)
1. In ISDBTreeNode:
- BackToPreviousNode
- ForwardToPreviousNode
(Like pressing alt+right/left.)
2. ISDBUISingleDateTimeBox and ISDBUIDateTimeRangeBox (They could perhaps be combined into one)
With members like
- HideTime
- DefaultValue
+ more?
This assumes that MM implements a DateTimeInputBox which is to be used in various places where a single date or date range should be given. (e.g. Dateadded, Timestamp and Lastplayed in auto-playlists & advanced searches)
e.g. (Without time)
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
-
- Posts: 906
- Joined: Sun May 28, 2006 4:22 am
- Location: Australia
- Contact:
I've talked about this before, but no one responded and I'd really like to know if it's coming....
what are the chances of getting a function similar towhich allows you to specify the index of the track you want to hide? (rather than the user having to select them)
eg.
Dale.
what are the chances of getting a function similar to
Code: Select all
SDB.MainTracksWindow.RemoveSelectedTracks
eg.
Code: Select all
SDB.MainTracksWindow.RemoveTrack( index )
Product Designer & Indie Developer.
Building at the intersection of motion, art, and code.
Find me on twitter and all the other ones here.
Building at the intersection of motion, art, and code.
Find me on twitter and all the other ones here.
As it is now, the Tools > Scripts submenu only shows up when the Scripts.ini file has ScriptType=0 entries.
With an empty Scripts.ini file (or at least if it's not containing any ScriptType=0 entries), the submenu never shows up even if an autoscript adds an item to SDB.UI.Menu_Scripts
Would it be possible to let the submenu always show up if items are added to SDB.UI.Menu_Scripts ?
With an empty Scripts.ini file (or at least if it's not containing any ScriptType=0 entries), the submenu never shows up even if an autoscript adds an item to SDB.UI.Menu_Scripts
Would it be possible to let the submenu always show up if items are added to SDB.UI.Menu_Scripts ?
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).