shuffle script needed.

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

Moderators: Peke, Gurus

rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

shuffle script needed.

Post by rovingcowboy »

Okay some place i seen a shuffle not working message by another member.

i can't remember where it was or who posted it.

but i answered them and said the monkey's suffle was better then winamp's.

:( :oops: let me tell them now. I am Sorry i was Wrong :oops: :(

it seems some place i had found a plugin for winamp that would adjust the shuffle of the first song in the playlists.

when i had to reinstall monkey i had removed all its folders. and did not have that plugin backed up. so now my shuffle is not working any better then winamps?

So now i need to find that plugin again. which is almost impossible as it is not on the winamp site anymore?, OR come here and request someone write a script to randomize the playlists so they do not constinestly play the first song when they are started.

if there is a script like that already what is it please.

8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

As I remember something was written, but what? (Am I ageing ?!?!?)

It should be easy :)

Code: Select all

Randomize
SDB.Player.CurrentSongIndex = Int((SDB.Player.PlaylistCount+1) * Rnd)
Just add those two lines Line of code before any play command (SDB.Player.Play) in playlist scripts and you will get Random start play of that script.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

:o

okay i have it in all my windows scheduler codes i use

but it don't work?

here is the one code i use for a playlist all the scheduler scripts look the same way. except the playlist names are different.

so why won't this randomize?
This code does do a moving of the start song in the list.
it will make the playlist play the second song in the list.

Code: Select all


'NAME: Mediamonkey Scheduled Playlist v1.0 
' 
' AUTHOR: Peke 
' DATE  : 16.08.2005 
' 
' INSTALL: 1. Read info above line with 'Playlist =' 
'          2. Just start Script in Scheduled time and MediaMonkey Will play 
'             desired playlist. 
' 
' COMMENT: This is third party Windows Host Script that takes advantage of 
'          MediaMonkey to play desired Playlist at desired time. 
' 
' NOTE: Mediamonkey needs to be started before script executes 
' 
'========================================================================== 
Dim SDB, Songs, playlist 

'Create Inits MM Object and Scripting Language 
Set SDB = CreateObject( "SongsDB.SDBApplication") 

'Set MM to Stay Started after Script execution 
SDB.ShutdownAfterDisconnect = False 

' Use this to Change Which playlist you wish to play on script execute? 
' Enter name of Mediamonkey playlist you wanna play? 
Playlist = "Country mix" 

If SDB.Player.isPlaying or SDB.Player.isPaused then 
  SDB.Player.Stop 
End If 
Sdb.player.playlistclear 
Sdb.player.currentSongIndex = 0
Randomize 
SDB.Player.CurrentSongIndex = Int((SDB.Player.PlaylistCount+1) * Rnd) 
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 


psyxonova's re write of the above code which is below will randomize the playlist starting song.
Last edited by rovingcowboy on Tue Oct 11, 2005 1:29 pm, edited 1 time in total.
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

How About this?

Code: Select all

'NAME: Mediamonkey Scheduled Playlist v1.0
'
' AUTHOR: Peke
' DATE  : 16.08.2005
'
' INSTALL: 1. Read info above line with 'Playlist ='
'          2. Just start Script in Scheduled time and MediaMonkey Will play
'             desired playlist.
'
' COMMENT: This is third party Windows Host Script that takes advantage of
'          MediaMonkey to play desired Playlist at desired time.
'
' NOTE: Mediamonkey needs to be started before script executes
'
'==========================================================================
Dim SDB, Songs, playlist

'Create Inits MM Object and Scripting Language
Set SDB = CreateObject( "SongsDB.SDBApplication")

'Set MM to Stay Started after Script execution
SDB.ShutdownAfterDisconnect = False

' Use this to Change Which playlist you wish to play on script execute?
' Enter name of Mediamonkey playlist you wanna play?
Playlist = "Country mix"

If SDB.Player.isPlaying or SDB.Player.isPaused then
  SDB.Player.Stop
End If
Sdb.player.playlistclear
Sdb.player.currentSongIndex = 0
sdb.player.playlistaddtracks(SDB.PlaylistByTitle(Playlist).tracks)
Sdb.player.currentSongIndex = 0
Randomize
SDB.Player.CurrentSongIndex = Int((SDB.Player.PlaylistCount+1) * Rnd)

' 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
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

no it dont work either?

all it does is stop the playlist?

i thought peke said it was simple? :o

i have moved them two lines of code all over the place in that script
and it wont work.

i have changed the number 0 to some other number and that just stops the playlist also.

so i put it like he said to put it and posted back here. maybe he can see what he did that is not working?

the script works it starts the playlist and all that but it just wont randomize.

:o :( :-?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

Oh, come on...
it works fine for me, i did a litlte edit 1 minute after i post it
please recopy the code and recreate the script
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

i did. it did not work in my computer either?

is there something different in scripting between win98 and winxp?

of course i might have typed it wrong some how so i guess i should just copy it and paste it instead of retyping your code to notepad?
:-? 8)

will go and try it again.

okay i copied and pasted your code.

and when i looked at it i did miss something you had done to peke's code.

i also found out what was going on with peke's code.

first in order of the way they are posted.

pekes code the one i posted and said did not work.

in fact does work but it does not randomize all it does is start the list off with the second song in the list instead of the first song? with so many songs on the list i had a hard time seeing it was not scrolled up all the way so i thought the second song was the first song. :oops: but peke's code does move the start song from the first to the second one.

now your redo of peke's code.
it is the one that randomizes it does randomize on my computer's also.
i had missed that you cut the last part of peke's code off in your rewrite of his.

so i only redid the middle part you did when i tried it the first time.
but copying and pasteing the rewrite code in the computer does randomize.
8) :D :lol:but incase your wondering why i did not notice the song was the second song. my list has the same artist doing the first 4 or 5 songs. and the list is in order of the artist. but when i used psyxonova's code and heard dolly parton singing i knew it randomized as dolly don't sound like aaron tippin. :roll:
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

Will I get any credits for changing My code with My code?
I do not know how to clasify that in Copyright law :lol: :lol: :wink:
except THX psyxonova for doing work for me.

rovingcowboy,
As you have exp in using that mine script can you make a little Text Info how it is used so that we can make archive of it and put it on my Fan page for easy access?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

you want me to write an article or thread of how to use your windows scheduler script.?

okay i will try but i thought it was kind of evident of how to use it?

but maybe my long windedness can make more sense out of it :D :D
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

i sent you a pm with the text article in it peke,

is that what you wanted? or is it too much?

:-?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

It was More then I wanted.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

Ofcourse the cretids go to you my friend Peke.
I just reorder and deleted a bunch of lines that allthoug they workd fine in the original script, did't allow the randomize effect that cowboy added. (Since they were setting the currentsongindex = 0 after the randomization, and thus forcing the player to play the first song).
As for copyrights laws, you should have thinked of that before you post your source code without any Accept agreement......
Now i can do whatever i want without asking you with your code and post it as mine. As a matter of fact i do this all the time :lol:
Image
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

Peke wrote:It was More then I wanted.

OH sorry?

how do you want me to reduce it to something else?

what is needed to be cut out of it in other words?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

I'll do the cutting :)
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Kuby

Playlist shuffle

Post by Kuby »

??? this script shuffle - does it shuffle "ONCE" upon entering into the playlist or "EVERYTIME" you seek a song selection?

I ONLY want to shuffle ONCE upon entering the playlist then play in sequence from #1 to the last song.

The MM shuffle mode shuffles between every darn song selection with no weighing of the songs. Consequently, you may never hear some songs and hear the same songs many times in a repeat playlist.
Post Reply