If you left a song playing when MediaMonkey closed, it will resume playing if you start MediaMonkey within a timeout period set for 30 minutes, otherwise song will be paused at the position you left it.
==============================================
MediaMonkey v2.5
Changelog:
2.10 - 2.20 : Tuned up to do as little as possible (12 December 2006)
Install ResumePlay for MM 2.5
Open zip, and just double click the install file.
Uninstall = Remove file \Program Files\MediaMonkey\Scripts\Auto\ResumePlay.vbs
==============================================
MediaMonkey v3.0
Changelog:
3.0 Added delay timer due to slow reaction from MM3
3.1 Replaced delay timer with dynamic timer, to allow for various delay needs.
Install ResumePlay for MM 3.0
==============================================
The timeout period can be set in this line in the script
Code: Select all
TimeOut=30 'in Minutes
Code: Select all
'---------------------------------------------------------------
' \Program Files\MediaMonkey\Scripts\Auto\ResumePlay.vbs
'
' Version: 3.1
' Date: 7 January 2008
' By DiddeLeeDoo
'---------------------------------------------------------------
Sub OnStartUp
Set TMR=SDB.CreateTimer(100)
With SDB.Registry
If .OpenKey("Resume Play", False) Then
If .BoolValue("Unfinished") Then
.BoolValue("Unfinished")=False
If .BoolValue("Played") And _
DateDiff("s",Now,.StringValue("TimeOut"))>0 Then
SDB.Player.Play
Script.RegisterEvent TMR, "OnTimer","WasPlaying"
Else
SDB.Player.Play
Script.RegisterEvent TMR, "OnTimer","WasPaused"
End If
End If
.CloseKey
End If
End With
Script.RegisterEvent SDB,"OnShutdown","CheckPlaying"
End Sub
Sub WasPlaying(TMR)
With SDB.Registry
If .OpenKey("Resume Play", False) Then
x=.IntValue("StoppedAt")
SDB.Player.PlayBackTime=x
.CloseKey
End If
End With
If SDB.Player.PlayBackTime=>x Then Script.UnregisterEvents TMR
End Sub
Sub WasPaused(TMR)
With SDB.Registry
If .OpenKey("Resume Play", False) Then
x=.IntValue("StoppedAt")
SDB.Player.PlayBackTime=x
SDB.Player.Pause
.CloseKey
End If
End With
If SDB.Player.PlayBackTime=>x Then Script.UnregisterEvents TMR
End Sub
Sub CheckPlaying
If SDB.Player.isPlaying Then
Played=Not SDB.Player.isPaused
TimeOut=30 'in Minutes
With SDB.Registry
If .OpenKey("Resume Play", True) Then
.BoolValue("Unfinished")=True
.BoolValue("Played") =Played
.IntValue("StoppedAt") =SDB.Player.PlaybackTime
.StringValue("TimeOut") =DateAdd("n",TimeOut,Now)
.CloseKey
End If
End With
End If
End Sub