Does a "Add Current Song to Playlist" Script Actually Exist?

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

Moderators: Peke, Gurus

WCityMike
Posts: 7
Joined: Sat Nov 05, 2011 2:13 pm

Does a "Add Current Song to Playlist" Script Actually Exist?

Post by WCityMike »

I'm looking for a script that adds the currently playing song to a preprogrammed playlist. For my purpose, I'm doing it for songs that would be good to exercise to.

However, Google isn't my friend in this matter, nor is the board's search function -- I can find a few hundred different people who have asked after it, but I can't find a working example of it anywhere that I can just download and put in there. The closest I found was someone who said "oh, this particular function is what you'd need" to the person asking.

It looks as if a few hundred requests for such a function exist -- yet I can't seem to find a working example of it anywhere.

Yes, I've got the interim measure of the "Add to Playlist" button, but that takes what I'd like to be a background, one-keystroke solution and makes it an interrupting four-step solution (bring MM to the front, click on the active song in Now Playing so it doesn't try to add the last song, click the Playlist button, select the 'Exercise' playlist off the pull-down menu).

I'm afraid I do not have the technical expertise to write my own MediaMonkey script to fulfill this function. Would someone be willing to write such a script (in my case, the list's name is 'Exercise'), and become not only my hero but the hero of everyone who's Googling for this in the future?
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by nynaevelan »

In the middle of this discussion forum there is a copy2playlist script, once you open the script in notepad (or similar text editor) and designate the playlist it should work for what you are looking for: http://www.mediamonkey.com/forum/viewto ... s&start=30
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

nynaevelan wrote:In the middle of this discussion forum there is a copy2playlist script, once you open the script in notepad (or similar text editor) and designate the playlist it should work for what you are looking for: http://www.mediamonkey.com/forum/viewto ... s&start=30
Hey that's useful thanks!

Does anybody know what line I should change if I want to copy the currently selected song instead of the currently playing song?
Image
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

Also, how does one install that script?
Image
WCityMike
Posts: 7
Joined: Sat Nov 05, 2011 2:13 pm

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by WCityMike »

I must echo his question. I thought that saving it with a VBS extension in C:\Program Files (x86)\MediaMonkey\Scripts\ would do it, yet nothing I can do gets it to appear.

As an update, I see it in the Hotkey section, but assigning a keystroke to it does nothing when it's executed, i.e., the currently playing song isn't added to the playlist when the key is pressed.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by nohitter151 »

Onweerwolf wrote:Also, how does one install that script?
It's an installation package so you'd just download the .mmip file and double-click to install.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

nohitter151 wrote:
Onweerwolf wrote:Also, how does one install that script?
It's an installation package so you'd just download the .mmip file and double-click to install.
There's no mmip file just a piece of code.
Image
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by nohitter151 »

Onweerwolf wrote:
There's no mmip file just a piece of code.
http://www.mediamonkey.com/forum/viewto ... 30#p175277
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

nohitter151 wrote:
Onweerwolf wrote:
There's no mmip file just a piece of code.
In the first post of the thread, there are two links to download an mmip file.
That's not the script we're talking about. It's this one:
raybeau528 wrote:nyn, you might like this little code snippet - it copies the current playing song to a playlist. For now you'll need to edit the code for the playlist you wish to use. Potentially it could benefit by having a hot key assigned to it. I have a playlist called favorites so when I play a song I like I just right cick in the now playing window and select "Copy Current Song to PlayList". I may formalize it later but I need to fix a couple things with mmStations first. By the way, I've gotten to like mmStations in the Vertical layout - thanks for that suggestion!

Code: Select all

Option Explicit

Dim UI            		: Set UI     = SDB.UI
Dim DB            		: Set DB     = SDB.Database
Dim INI           		: Set INI    = SDB.IniFile


Dim AppTitle : Apptitle = "CopytoPlayList v1.0"

	


Sub OnStartup	'Create Save NowPlaying Menu Item

  Dim itm1

  Set itm1 = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP,0,0)
  itm1.Caption = "Copy Current Song to PlayList"
  itm1.OnClickFunc = "CopytoPlayList"
  itm1.UseScript = Script.ScriptPath
  itm1.IconIndex = 18
  itm1.Visible = True

End Sub 'OnStartup


Sub CopytoPlayList(arg)

	dim PlayList : Set PlayList = SDB.PlayListbyTItle("Favorites")
	
	playlist.addtrack(sdb.player.currentsong)

End Sub
Image
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by nohitter151 »

Onweerwolf wrote:
nohitter151 wrote:
Onweerwolf wrote:
There's no mmip file just a piece of code.
In the first post of the thread, there are two links to download an mmip file.
That's not the script we're talking about. It's this one:
raybeau528 wrote:nyn, you might like this little code snippet - it copies the current playing song to a playlist. For now you'll need to edit the code for the playlist you wish to use. Potentially it could benefit by having a hot key assigned to it. I have a playlist called favorites so when I play a song I like I just right cick in the now playing window and select "Copy Current Song to PlayList". I may formalize it later but I need to fix a couple things with mmStations first. By the way, I've gotten to like mmStations in the Vertical layout - thanks for that suggestion!

Code: Select all

Option Explicit

Dim UI            		: Set UI     = SDB.UI
Dim DB            		: Set DB     = SDB.Database
Dim INI           		: Set INI    = SDB.IniFile


Dim AppTitle : Apptitle = "CopytoPlayList v1.0"

	


Sub OnStartup	'Create Save NowPlaying Menu Item

  Dim itm1

  Set itm1 = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP,0,0)
  itm1.Caption = "Copy Current Song to PlayList"
  itm1.OnClickFunc = "CopytoPlayList"
  itm1.UseScript = Script.ScriptPath
  itm1.IconIndex = 18
  itm1.Visible = True

End Sub 'OnStartup


Sub CopytoPlayList(arg)

	dim PlayList : Set PlayList = SDB.PlayListbyTItle("Favorites")
	
	playlist.addtrack(sdb.player.currentsong)

End Sub
http://www.mediamonkey.com/forum/viewto ... 30#p175277
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

The link in that post is dead.
Image
WCityMike
Posts: 7
Joined: Sat Nov 05, 2011 2:13 pm

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by WCityMike »

Indeed, that's the precise problem I ran into as well.
Eyal
Posts: 3126
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec
Contact:

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Eyal »

This is an auto script, so the correct location to put it in is:
C:\Program Files (x86)\MediaMonkey\Scripts\Auto
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
Onweerwolf
Posts: 714
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by Onweerwolf »

Eyal wrote:This is an auto script, so the correct location to put it in is:
C:\Program Files (x86)\MediaMonkey\Scripts\Auto
I'ev tried copying the code to a text editor then save it as an .vbs file and put it in the auto folder but MM gave errors when I started it after that and then it crashed.

Edit; note: On a MM 4, portable installation that is.
Image
WCityMike
Posts: 7
Joined: Sat Nov 05, 2011 2:13 pm

Re: Does a "Add Current Song to Playlist" Script Actually Ex

Post by WCityMike »

Copied the script's text to a text editor, saved it as a VBS file in the Auto directory as instructed.

I can right-click on the track in 'Now Playing' and get an option ... but it doesn't actually do anything.

(Additionally, I must admit my sincere hope was to get something that I could assign to a keystroke ... and it doesn't show up in the "Script" area of the Hotkeys preference.)

EDIT: I'm using a non-portable installation of MM 3.2.5.1306.
Post Reply