The AutoPlaylist.vbs script hangs the computer for 1 minute

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

Moderators: Peke, Gurus

Darryl_Gittins
Posts: 294
Joined: Fri Jan 14, 2005 11:48 am

The AutoPlaylist.vbs script hangs the computer for 1 minute

Post by Darryl_Gittins »

For months I've been stumped as to why MM would hang the entire computer for 1 minute on startup. CPU would peg at 100% for nearly a minute. I thought it was because I had a lot of songs (1600)

Today I found the problem. I removed the AutoPlaylist.vbs script from the \Program Files\MediaMonkey\Scripts\Auto folder and BOOM - MM starts instantly!

What a relief!!

I'm not much good with scripting so I don't know what is wrong with the script. Here it is:

Code: Select all

Sub OnStartup
  Dim Songs, playlist
  ' Use this to Change Which playlist you wish to play on startup.
  ' Enter name of playlist you wanna play on next MM startup
  Playlist = "quiet"

  Sdb.player.playlistclear
  Sdb.player.currentSongIndex = 0
  sdb.player.Play
  sdb.player.playlistaddtracks(SDB.PlaylistByTitle(Playlist).tracks)
  Sdb.player.currentSongIndex = 0
  
  ' When MediaMonkey is starting playing of desired playlist.
  ' if you want that MediaMonkey do not start playing automaticaly add "'" in front of next line
  sdb.player.Play
  If Sdb.player.currentSongIndex > 0 Then
    sdb.player.Stop
    Sdb.player.currentSongIndex = 0
  end if
End Sub
The Playlist = "quiet" does exist.

What a great program MM is though. Sure makes MS WMP 11 look like a toy! I'm really looking forward to the next release.

Thanks!
Lowlander
Posts: 59396
Joined: Sat Sep 06, 2003 5:53 pm

Post by Lowlander »

Please report this to the script developer and check if there is no newer version is available. Also check out any information on the forum if this is a known issue or something that requires configuring on the user part.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well I couldn't get that version to work at all, so here's my version...

Code: Select all

Sub OnStartup
  Playlist = "quiet"
  SDB.Player.PlaylistClear
  SDB.Player.PlaylistAddTracks(SDB.PlaylistByTitle(Playlist).Tracks)
  Dim Tmr : Set Tmr = SDB.CreateTimer(1000)
  Script.RegisterEvent Tmr, "OnTimer", "PlayTimer"  
End Sub

Sub PlayTimer(tmr)
  Script.UnregisterEvents tmr
  SDB.Player.CurrentSongIndex = 0  
  SDB.Player.Play
End Sub
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