After a long time I tried it again because the issue seems to be fixed.
Because the wiki
https://www.mediamonkey.com/wiki/Contro ... plications says that
"The SDBApplication class is largely unchanged from MediaMonkey 4, but the biggest difference is that it is named SongsDB5.SDBApplication instead of SongsDB.SDBApplication"
I simply changed that part of the script and executed it again.
Code: Select all
C:\Program Files (x86)\MediaMonkey 5\Scripts\Play Playlists Randomized.vbs PlaylistName
Code: Select all
Dim SDB, Songs
Set SDB = CreateObject("SongsDB5.SDBApplication")
SDB.ShutdownAfterDisconnect = False
Sdb.player.playlistclear
Dim i
For i = 0 To (WSH.Arguments.Count-1)
sdb.player.playlistaddtracks(SDB.PlaylistByTitle(WSH.Arguments.Item(i)).tracks)
Next
If SDB.Player.isPlaying or SDB.Player.isPaused then
SDB.Player.Stop
End If
Randomize
SDB.Player.CurrentSongIndex = Int((SDB.Player.PlaylistCount+1) * Rnd)
SDB.player.Play
No crash and three MM5 processes are being started:
"C:\PROGRA~2\MediaMonkey 5\MediaMonkey.exe" -Embedding
"C:\PROGRA~2\MediaMonkey 5\MediaMonkeyEngine.exe" --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=3528,4776923566102479129,9490495931099042589,131072 --disable-features=IsolateOrigins,site-per-process --lang=en-US --service-sandbox-type=none --no-sandbox --locales-dir-path="C:\PROGRA~2\MediaMonkey 5\chromium\90\locales" --log-file="C:\PROGRA~2\MediaMonkey 5\debug.log" --log-severity=disable --lang=en-US --log-file="C:\PROGRA~2\MediaMonkey 5\debug.log" --mojo-platform-channel-handle=3536 /prefetch:8
"C:\PROGRA~2\MediaMonkey 5\MediaMonkeyEngine.exe" --type=renderer --no-sandbox --autoplay-policy=no-user-gesture-required --js-flags="\"--expose-gc\"" --log-file="C:\PROGRA~2\MediaMonkey 5\debug.log" --remote-debugging-port=9222 --field-trial-handle=3528,4776923566102479129,9490495931099042589,131072 --disable-features=IsolateOrigins,site-per-process --lang=en-US --locales-dir-path="C:\PROGRA~2\MediaMonkey 5\chromium\90\locales" --log-file="C:\PROGRA~2\MediaMonkey 5\debug.log" --log-severity=disable --uncaught-exception-stack-size=10 --device-scale-factor=1.25 --num-raster-threads=2 --enable-main-frame-before-activation --renderer-client-id=4 --mojo-platform-channel-handle=3732 /prefetch:1
but no UI comes to the foreground.
When I start MM5 normally the main process starts without the
argument. Does that prevent the UI from starting? How can I fix that?