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.

Check for running process?

If you have a question or need help, this is the place to be.
Post Reply
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Check for running process?

Post by skribb »

Is it possible to check for running process by name?

I.e something like; if banana.exe is running change eg.result to "yes" else eg.result is "no"


Could it be possible bwith Ptython? I think I might need to import some libraries in that case, if EG supports that!
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Check for running process?

Post by jonib »

skribb wrote:Is it possible to check for running process by name?
If the process has a window (even if hidden) you can use "Action\Window\Find a Window". You can also use "Task create/Switch Events" or "Process watcher" plugins to get events when a program gets started/stopped or gets in/out of focus.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Check for running process?

Post by skribb »

That's true, I guess I could just make a variable that keeps track of the process' status.

Tack :D
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Check for running process?

Post by jonib »

skribb wrote:That's true, I guess I could just make a variable that keeps track of the process' status.
psutil library was included in EventGhost 4.0.1.r1722.
psutil is a cross-platform library for retrieving information onrunning processes and system utilization (CPU, memory, disks, network)in Python.
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Check for running process?

Post by skribb »

jonib wrote:
skribb wrote:That's true, I guess I could just make a variable that keeps track of the process' status.
psutil library was included in EventGhost 4.0.1.r1722.
psutil is a cross-platform library for retrieving information onrunning processes and system utilization (CPU, memory, disks, network)in Python.
jonib

Sweet. I should have checked first before posting but thanks for the info, I could definitely use psutil lib :D
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
Post Reply