Page 5 of 14

Re: mmStations V2.3

Posted: Sun Dec 21, 2008 4:33 pm
by nynaevelan
Ray:

Thank you, now I should be able to keep my now playing list while jumping back and forth between MM versions. These two scripts are a part of my daily arsenal. :D :D

Nyn

Re: mmStations V2.3

Posted: Sun Dec 21, 2008 5:21 pm
by raybeau528
Such a little script too!

Re: mmStations V2.3

Posted: Mon Dec 22, 2008 11:08 am
by nynaevelan
Ray:

What is supposed to trigger the timer to start? Is it an hour after a manual save or done, an hour after MM is started?? It is not working but I want to make sure I know what triggers it...

Nyn

Re: mmStations V2.3

Posted: Mon Dec 22, 2008 11:43 am
by raybeau528
Nyn,

It should start when you start media monkey. I'm heading out of town for a couple of days and won't be able to look into it right away but you could try changing the timer to say 5 minutes (1000*60*5) or even 1 minute (1000*60) to see if indeed it's working or not.

Ray

Re: mmStations V2.3

Posted: Mon Dec 22, 2008 12:29 pm
by nynaevelan
I tried the 5 minute timer and it is not working, when you get a moment I would appreciate it.

Nyn

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 3:03 pm
by raybeau528
Nyn,

I'm not sure what the issue is - it works fine on my system (of course!). Any errors? I'll put something together to try to debug the issue.

Ray

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 3:12 pm
by nynaevelan
Where do you have the playlists set to update to, and do you do anything to save besides opening MM?? I am on Vista although I do not think that matters...

Nyn

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 3:16 pm
by raybeau528
Nyn,

This will attempt to copy nowplaying every 1 minute and display a message box. Let me know the results. Make sure you copy this to \scripts\auto.

Ray



Code: Select all

'
' MediaMonkey Script
'
' NAME:  SaveNowPlaying
'
'
' [SaveNowPlaying]
' FileName=SaveNowPlaying.vbs
' ProcName=SaveNowPlaying
' Order=210
' DisplayName=Save NowPlaying
' Description=Save NowPlaying List to a PlayList
' Language=VBScript
' ScriptType=0
'
'

Option Explicit

Sub OnStartup	'Create Save NowPlaying Menu Item

  Dim itm1

  Set itm1 = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP,0,0)
  itm1.Caption = "Save NowPlaying"
  itm1.OnClickFunc = "SaveNowPlaying"
  itm1.UseScript = Script.ScriptPath
  itm1.IconIndex = 18
  itm1.Visible = True
  
  Dim Tmr : Set Tmr = SDB.CreateTimer( 1000*60 )   ' 1 hour Timer Enabled
  Tmr.Enabled=true
  Script.RegisterEvent Tmr, "OnTimer", "SaveNowPlaying"

End Sub 'OnStartup


Sub SaveNowPlaying(arg)

	Dim TopPlayList	: Set TopPlaylist = SDB.PlaylistByTitle("")
	Dim NewPlayList
	Set NewPlayList = TopPlayList.CreateChildPlaylist("Copy of NowPlaying "&dtnum)
	If not (NewPlayList is Nothing) Then
		NewPlayList.Clear
	End If
		
	NewPlayList.AddTracks(SDB.Player.CurrentSongList)
	msgbox("Timer triggered - check " & NewPlayList.Title )
End Sub

' Returns a 14 char string which changes every second - should be unique for this application
function dtNum()
	
	dim y,m,d,h,n,s
	
	y = Cstr(DatePart("YYYY",Date))
	m = zfill(Cstr(DatePart("m",Date)),2)
	d = zfill(Cstr(DatePart("d",Date)),2)
	h = zfill(Cstr(DatePart("h",now)),2)
	n = zfill(Cstr(DatePart("n",now)),2)
	s = zfill(Cstr(DatePart("s",Now)),2)
	
	dtNum = y & m & d & h & n & s
	
end function


' Left fills with zeros
function zfill(s,n)

	dim i,t
	t=s
	while len(t) < n
		t = "0" & t
	wend
	zfill = t

end function

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 3:50 pm
by nynaevelan
Now it's working, I guess it needed to be in the auto folder. Do you want me to get rid of the one in the \scripts\ folder? But now that we know it's working, we can get rid of the popup...

Nyn

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 5:30 pm
by MM3 monkey
I've just installed this for the first time - thank you - but can't get it working:-

I can choose Playlists and name the Stations in Options. I can view the 10 Station Buttons via the Play Menu. The new names appear OK on the buttons.

But when I click on a button, it says, "Station not assigned to Playlist."

When I go back to Options, the Playlists and names I just chose and named are no longer there (even though the name still shows on the button). Neither are the MM Station Settings in Options remembered.

By the way, in the Settings, the two Check-Boxes read: "Auto Start when" and "Enable Station Ec" i.e. the descriptions are surely truncated.

I've tried re-installing to no avail. It seems it's only me that has this issue, though, and your fine little script's been well tested. What could be my problem, I wonder? I'm looking forward to using this.

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 6:14 pm
by nynaevelan
Are you running on Vista? It reads like you do not have administrative rights. If so, trry opening MM as an administrater. BTW, the button says Enable Station Edits. I too see this truncation in 3.1, I never noticed this but I will report it in the Beta forum.

Nyn

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 7:30 pm
by MM3 monkey
Thanks. I'm running XP. I haven't had to deal with the administrative rights thing before; not sure why it would crop up now. Anyway, no, not Vista. Not sure I can remember my admin password anyway; hope it's not that!

I still click some actiive x warning when I start monkeyrok but i live with that because i've forgotten how to get rid of it and it's the least of my MM worries.

Re: mmStations V2.3

Posted: Tue Dec 23, 2008 7:49 pm
by nynaevelan
I'm not sure why your settings are not being saved, which options do you have selected in the Options Sheet? As for your Activex problems here is the solution to fix that:

Code: Select all

1) Run regedit.exe 
2) Goto HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0 
3) Modify key 1201 = 0 
Nyn

Re: mmStations V2.3

Posted: Wed Dec 24, 2008 12:25 am
by nynaevelan
Ray:

When you get a moment the text in the Options Sheet is not fully visible in 3.1, can you make it a little bigger so the user can see the full text?

Image

Nyn

Re: mmStations V2.3

Posted: Wed Dec 24, 2008 10:05 am
by raybeau528
Nyn, glad to hear it's working (savenowplaying). You should be able to install the first version I posted here that had the timer in it.

As for mmStations. I hadn't noticed anything truncated before but will look into it. I'm assuming you installed the latest package (mmStations.mmip) ? It should be version 2.4.

Ray