Need help writing first script - simple I think?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Need help writing first script - simple I think?

Re: Need help writing first script - simple I think?

by Peke » Mon Jan 13, 2020 11:39 pm

Hi,
MM5 is an new type of hybrid.

Install Portable and have fun, During beta Chromium debugging is enabled on right click an dyou can inspect any element of UI and also look at all .js files in MM5 folder.

Happy Monkeying!!!

Re: Need help writing first script - simple I think?

by lifeinbeats » Fri Jan 10, 2020 12:14 am

Wait, is MM5 written in JS??? That'd be amazing

Re: Need help writing first script - simple I think?

by lifeinbeats » Fri Jan 10, 2020 12:05 am

Hi Peke,

Thanks for your response. I actually didn't know you could code in js. That's awesome.

Alas, though, after giving it some more thought I don't think my idea will work. MM only has certain conditions for custom fields, and none of them are treated like a date.

Re: Need help writing first script - simple I think?

by Peke » Sat Jan 04, 2020 7:49 am

Hi,
you can use JS also in MMW no need for VBS.

I would rather suggest as you are in JS I would suggest that you look at MM5:
https://www.mediamonkey.com/forum/viewt ... 86639&sd=d
http://mediamonkey.com/forum/viewforum.php?f=29

Regarding MM4 See examples at:
http://mediamonkey.com/forum/viewtopic.php?t=5543
https://www.mediamonkey.com/forum/viewtopic.php?t=31634
https://github.com/mmuffins/mediamonkey-vgmdbAutoTag
https://github.com/mmuffins
https://github.com/topics/mediamonkey

Other than that I can help you start, just need few info on what you want to archive eg. How the date would be stored in Custom 1 on play? How It is related to Last Played/Played#/Skipped# fields?

Need help writing first script - simple I think?

by lifeinbeats » Fri Jan 03, 2020 5:14 pm

Hi there,

I'm old to MM but new to scripting. I'm learning JS right now but that's not super helpful for VBscript. I'd like to write a simple auto script that adds a datestamp to the "Custom 1" property of an mp3 every time that file's rating is updated.

I basically live and die by my MM ratings, and would love it if I could create an auto playlist with songs rated 3+ stars in the last year (or month or week, etc). New stuff I really liked but isn't necessarily related to when I added the track to the DB, because I have 30k songs and will hear songs I've never heard all the time despite the possibility that I've owned them for years and years.

Any advice on where to start? I've read some of the documentation from MM on scripting. I see that there's SDBTrackProperties which sounds promising although the docs warn against overuse. I could see why as the playcounter property gets updated every time a track is listened to. Then updating the SDBSongData to add a datestamp to the custom 1 tag?

Thanks in advance!

Top