Page 1 of 1
Addon that launches script on play and pause
Posted: Wed Feb 21, 2024 8:20 am
by Onweerwolf
Hiya,
I am sure this is possible. I searched for something usable but could not find it.
I am looking for an addon (or two different ones) that does two things:
1. It checks if MM has stopped playing for x seconds or longer and if so executes an external batch file
2. When MM starts playing it executes an external batch file
Can anyone help me out?
Re: Addon that launches script on play and pause
Posted: Wed Feb 21, 2024 9:13 am
by Erwin Hanzl
Re: Addon that launches script on play and pause
Posted: Thu Feb 22, 2024 4:49 pm
by Onweerwolf
That doesn't seem to be what I am looking for. Do you mean that there is something in this script that i can use? Might be but I can't use that from only a mmip file.
Re: Addon that launches script on play and pause
Posted: Thu May 23, 2024 10:22 am
by Eyal
Hi Onweerwolf,
It's been a very long time... since I didn't made programmation.
I'm pretty sure it's possible do do it.
If I take snippets of my Silence between Songs script, you need to use something like this:
Code: Select all
' Register Play and Stop event:
Script.RegisterEvent SDB, "OnPlay", "PlayerOnPlay"
Script.RegisterEvent SDB, "OnTrackEnd", "PlayerTrackEnd"
And then make subroutines to call your external batch file:
Code: Select all
' This will be executed when track starts playing:
Sub PlayerOnPlay()
your code here
End Sub
Code: Select all
' This will be executed when track stops playing:
Sub PlayerTrackEnd()
your code here
End Sub
To disable everything:
I hope it helps.
Peace