Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Stop chosen apps with System.Suspend

If you have a question or need help, this is the place to be.
Post Reply
User avatar
GBWebmaster
Experienced User
Posts: 115
Joined: Wed Sep 24, 2008 5:34 am

Stop chosen apps with System.Suspend

Post by GBWebmaster »

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
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Stop chosen apps with System.Suspend

Post by Pako »

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 2074 times
Python Script:

Code: Select all

if not eg.plugins.MediaMonkey.plugin.isRunning():
    eg.StopMacro()
Pako
User avatar
GBWebmaster
Experienced User
Posts: 115
Joined: Wed Sep 24, 2008 5:34 am

Re: Stop chosen apps with System.Suspend

Post by GBWebmaster »

Thank you Pako, now it works fine.

GBWebmaster
F├╝r den, der nie das Rudel anf├╝hrt,
wird sich die Aussicht nicht ändern.
Post Reply