Windows Scheduler and MediaMonkey Small Help Script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Windows Scheduler and MediaMonkey Small Help Script

by rovingcowboy » Sun Nov 06, 2005 5:07 am

oh could be as it is the win98 i tried it on.

but i just made it really simple.

i made me some blank sound wav's no longer then 40 seconds and converted them to mono ogg files.

and put them in a playlist.
then when i want to stop the player from playing music i just call that playlist and it plays silent files until i stop it or a new playlist starts.

has the same effect as stopping the player with out really stopping it :P :lol: 8)

by Peke » Sat Nov 05, 2005 9:39 am

It is not due Script execution as it only sets flags for MM.

I'm guessing that something is going with ActiveX/COM Object server.

by rovingcowboy » Fri Nov 04, 2005 10:06 pm

well i tried the script above for shuting down media monkey.

it is also different from the one in the windows scheduler script.
because it does not dim. the player or the playlist.

8)

but the two lines for shutting down the media monkey player did just that

when it was set to run in the task scheduler it ran it closed media monkey.

yes i know its been a long time since you posted it but i have to get it in with all the other tasks i had scheduled and i thought it would work?

but it also closed all of windows execpt the mouse drivers? all i had on the screen was black with a mouse pointer.

no keyboard short cut would work. the keyboard drivers were gone when windows was closed but the mouse dirver did not go?

i had to reboot in order to get windows to work again.

by Peke » Sun Oct 16, 2005 5:14 am

If you closly look sheduled Script have FALSE and above one TRUE.

by rovingcowboy » Sun Oct 16, 2005 2:57 am

peke that is in the windows schedulers script already.

but the trouble i have in not shutting down monkey is not monkey or the script.

but i can't seem to get task scheduler to close monkey or some other programs it just wont close all things for some reason.

not sure why but it must be another one of microsofts famous Oops errors. :roll:

by Peke » Sat Oct 15, 2005 5:49 pm

Code: Select all

Dim SDB
Set SDB = CreateObject( "SongsDB.SDBApplication")
SDB.ShutdownAfterDisconnect = True
This will close MM on On script execution :)

WARNING!!! Be carefull as all background work in MM will be stopped without asking and MM will exit.

OUPS, I forgot that this needs to be saved in "ShutdownMM.vbs"

by Guest » Sat Oct 15, 2005 7:05 am

if your using winXp you are not in the admin desktop unless you go in through the safemode start up.

it makes the admin a user desktop with the admin rights set up for that user. but there is some flaws in windows with that set up and sometimes it wont let you do things unless you go in to safemode and go in to admin and set it up in there? something ms screwed up on again. :(

but i have always got the scripting host error report?

i just made a task to start monkey 2 to 5 minutes before i start the timed playlists. then monkey plays the lists no trouble except i can't get windows to auto close monkey? which is not too bad as i can't get windows to close half the stuff i open with timers. and i use monkey on a jukebox computer so it only plays music 8)

roving cowboy / keith hall
not logged in
just surfin' through agian.

by Peke » Sat Oct 15, 2005 6:02 am

There is Known Issue regarding Windows and MM.

Right After line
Set SDB = CreateObject( "SongsDB.SDBApplication")
Windows do initialize MM ActiveX Server right so that Start Of MM is in constant loop this is why WSH reports Error as windows do not recognize MM is started. Something was done in recent alphas but I guess there is still a problem.

by terrypin » Sat Oct 15, 2005 3:33 am

Happy to report that (after much research and anguish!) I sorted the Scheduled Tasks issue. As hoped, the MM script then worked ;) Thanks.

BTW, despite the warning, I also tried it with MM not running. I had it set to repeat every 10 mins, and the first time it did bring up MM and played. But the subsequent times it gave me this error:
---------

Windows Script Host

Script: D:\Program Files\MediaMonkey\Scripts\auto\MM-Script-Scheduling.vbs
Line: 21
Char: 1

Error: ActiveX component can't create object: 'SongsDB.SDBApplication'
Code: 800A01AD
Source: Microsoft VBScript runtime error
---------

That's a pity. After all, the real benefit of Scheduled Tasks is that you can set them and forget them. If you have to run MM first, then you may as well then just select an appropriate playlist when you need it.

Is there any other way of achieving this please?Was there some new facility announced in MM itself, to avoid an external script etc?

--
Terry, West Sussex, UK

by terrypin » Sat Oct 15, 2005 12:23 am

rovingcowboy:

Thanks. I'm sure script is OK and will work when I get the Scheduled Tasks problem sorted.

All the obvious settings are correct (and,as I said, these have been running OK for a long time).

I am a solo user, so I am 'the administrator'.

--
Terry, West Sussex, UK

by rovingcowboy » Fri Oct 14, 2005 12:16 pm

terrypin
if your trying to use the script from peke make sure you name the playlist to a name that you use in the monkey? if you did that then it should work.

second you said all your tasks are not running.

go to the task scheduler and right click on a task to click on it's properties.

on the properties panel look and see if the check box.
that says. enable to run when loged on is checked.

if it is not checked then check it and try again.

in windows xp the only way to run a task with out that box checked is to be logged in to xp as the andmistrator.
not logged in to xp as a user with admin rights, that seems strange i know but that is what is going on.

by terrypin » Fri Oct 14, 2005 11:20 am

Help! It seems that it's not down to MM but something wrong with my WinXP.

I discovered that all my scheduled tasks (such as some important nightly backups) were no longer working. On examination, the Set Password box was empty for each one. I entered and confirmed them all - but on later re-opening Properties, the password is blank again.

FWIW, the Run As box contains TERRY\Terry.

I've posted in a couple of WinXP forums, but can anyone here suggest how I can fix this please? For a start, could someone confirm whether the Set Password box is supposed to retain any entries (usually a string of **** or bullets)? If not, how can you tell whether it is assigned?

--
Terry, West Sussex, UK

Re: Windows Scheduler and MediaMonkey Small Help Script

by terrypin » Fri Oct 14, 2005 11:16 am

Peke wrote:As one of users asked here is one small script for using with Windows Scheduler.

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 = "Lunch"

If SDB.Player.isPlaying or SDB.Player.isPaused then
  SDB.Player.Stop
End If
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
ONE NOTE: I suggest that Mediamonkey is started before executing this script or any of its copies.

Use it on your own risk free of charge.
Just came across this post. I know nothing about scripts, but followed your instructions and couldn't get any result. By "...simply tell Windows Task Manager to run that file at the set time," I assume you mean add path+filename.vbs as a scheduled task? I did that for a few minutes ahead, having changed the one occurrence of "Lunch" to "50s Possibles". MM was loaded, but nothing happened at the scheduled time. Tried using Run, but again nothing.

Any pointers as to what might be going wrong please?

--
Terry, West Sussex, UK

Internet Radio Streaming Made Easy

by rovingcowboy » Fri Sep 02, 2005 4:53 pm

the script in the first message is great.

only one thing made me mad.

i had to change about 200 scheduled tasks that were starting m3u lists for winamp and pls lists for jet audio to run on timers

boy did that take a long time.

but now this is more to my liking as i can delete half the files i have for my playlists and dont have to do double files like i was before, as in making lists with media monkey and exporting them.

i just use media monkey.

start media monkey and close it at end of day when i want the scripts to stop. they don't cause errors when changing from one to the other and that is the best thing i think for internet radio streaming. :D
now if i was a internet radio station this would be greater for me then it already is.

by rovingcowboy » Fri Sep 02, 2005 4:45 pm

media monkey can export to m3u? just do that.

Top