Stop chosen apps with System.Suspend

If you have a question or need help, this is the place to be.

Stop chosen apps with System.Suspend

Postby GBWebmaster » Mon Feb 13, 2012 2:00 pm

Hello,

I have the following problem. I want to stop XBMC and MediaMonkey, when I suspend my system.
In other words: EG should check, if XBMC runs. And, if so, close XBMC, if not, do nothing. Then check, if MediaMonkey runs. And, if so, close MediaMonkey, if not, do nothing.

How can I realize this?

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.
User avatar
GBWebmaster
Experienced User
 
Posts: 109
Joined: Wed Sep 24, 2008 5:34 am

Re: Stop chosen apps with System.Suspend

Postby Pako » Tue Feb 14, 2012 12:10 pm

I can not say anything about XBMC, because I do not know anything about it.
But MediaMonkey I know.
You can try it this way:
MM-System.Suspend-Closing.png
MM-System.Suspend-Closing.png (5.56 KiB) Viewed 628 times
Python Script:
Code: Select all
if not eg.plugins.MediaMonkey.plugin.isRunning():
    eg.StopMacro()
Pako
User avatar
Pako
Plugin Developer
 
Posts: 1283
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Stop chosen apps with System.Suspend

Postby GBWebmaster » Tue Feb 14, 2012 7:55 pm

Thank you Pako, now it works fine.

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.
User avatar
GBWebmaster
Experienced User
 
Posts: 109
Joined: Wed Sep 24, 2008 5:34 am


Return to General Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest