Delete And Skip 2.0

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Delete And Skip 2.0

Post by trixmoto » Wed Dec 14, 2005 5:29 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

onkel_enno
Posts: 2146
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno » Wed Dec 14, 2005 7:11 am

Why don't you use SDB.Tools.FileSystem.DeleteFile ? :lol:
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx

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

Post by trixmoto » Wed Dec 14, 2005 7:39 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

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

Post by trixmoto » Wed Dec 14, 2005 8:52 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

onkel_enno
Posts: 2146
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno » Wed Dec 14, 2005 8:56 am

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!
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx

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

Post by trixmoto » Wed Dec 14, 2005 9:28 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe » Thu Oct 12, 2006 8:12 pm

This looks useful. How do you assign a hotkey to a script?
I want to assign CTRL+Delete to this script.

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe » Thu Oct 12, 2006 8:19 pm

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: Barton, UK
Contact:

Post by trixmoto » Fri Oct 13, 2006 1:57 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

MeMeMe
Posts: 263
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe » Fri Oct 13, 2006 2:14 am

Ah, well that explains that :)

freckles
Posts: 2
Joined: Tue Jan 02, 2007 5:37 pm

Post by freckles » Wed Jan 10, 2007 3:16 pm

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: Barton, UK
Contact:

Post by trixmoto » Thu Jan 11, 2007 5:17 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

Post Reply