Delete And Skip 2.0

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

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Delete And Skip 2.0

Post by trixmoto »

This script should be run whilst a track you don't like is playing. It will ask for confirmation, and then remove the track from Now Playing and delete it from your computer.

Skip can be created anywhere as it runs externally to MM. Call it anything you like as long as the file extension is VBS. Most people wouold chose to assign a keyboard hotkey to this script.

This script has been discussed and developed here: http://www.mediamonkey.com/forum/viewtopic.php?t=6822. This is the official release.

:o NEW CODE BELOW :o
Last edited by trixmoto on Fri Oct 13, 2006 7:42 am, edited 2 times in total.
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.
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

Why don't you use SDB.Tools.FileSystem.DeleteFile ? :lol:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Because I didn't know you could! :)

Does SDB.Tools.DeleteTracks remove songs from the database? If not, can you from script?
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (2.0) - more stable because it uses MM to delete the file not the file system - also means that the file is deleted from the library as well as the computer.

Code: Select all

'
' MediaMonkey Script
'
' NAME: DeleteAndSkip 2.0
'
' AUTHOR: trixmoto (http://trix.dork.com)
' DATE : 14/12/2005 
'
' INSTALL: Can be run from anywhere, normally assigned to a hotkey.
' 
' FIXES: File also deleted from the library
'        

Set SDB = CreateObject("SongsDB.SDBApplication")
message = "Would you like to delete '"&SDB.Player.CurrentSong.Path&"'?"
If SDB.MessageBox(message, 3, Array(0,2)) = 6 Then
  Set dellist = SDB.NewSongList
  dellist.Add SDB.Player.CurrentSong
  SDB.Player.Next
  SDB.Tools.DeleteTracks dellist,False,1
  Set dellist = Nothing
End If
Set SDB = Nothing
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.
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

trixmoto wrote: Does SDB.Tools.DeleteTracks remove songs from the database? If not, can you from script?
I think so, but don't want to test it :wink:
But it would be useless if mm would delete the file but lets it untouched in library!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

After I posted I decided that I'd test it myself, and it does. It deletes it from now playing, the library and the computer. A much more stable and tidy method than the way I was doing it - cheers for pointing me towards SDB.Tools! :)
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.
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

This looks useful. How do you assign a hotkey to a script?
I want to assign CTRL+Delete to this script.
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

I get a database error when media monkey starts up: it says the error is in line 14 of DeleteAndSkip.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

This is NOT an autoscript! It is an external script. This means that when MM is running and a track plays that you want to completely delete and skip to the next one, you should run this script by double clicking it, or using Windows Script Host.

You will also need an external program to assign a hotkey to running the script. I have it attached to one of my "quick" hardware keys along the top of my keyboard.
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.
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

Ah, well that explains that :)
freckles
Posts: 2
Joined: Tue Jan 02, 2007 5:37 pm

Post by freckles »

FYI
I got the same error too. I think this script's installer from your site is putting it in the Auto directory...
Anyway, can't wait to try out all these scripts and really see MediaMonkey at work!
Thanks :)
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I have updated the installer to put the file in the Scripts folder, not the Auto folder. Thanks for pointing this out.
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.
Post Reply