HELP REQUEST check if an exe is running |
Author: |
Message: |
lovefallen
Junior Member
Posts: 43
– / /
Joined: Nov 2006
|
O.P. HELP REQUEST check if an exe is running
Hello everyone,
basically i want to do make a script that checks if wmp is running or not, then stop another script from working.. i'm new to scripting though not to programming.. I've read official documentation and msdn jscript documentation, but still I can't understand how exactly scripts work.. any help is much appreciated!
|
|
06-17-2007 07:34 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: HELP REQUEST check if an exe is running
You can use the EnumProcesses API to do this. I will try and post an example today for you.
|
|
06-18-2007 02:08 PM |
|
|
Voldemort
Veteran Member
Posts: 3504 Reputation: 49
– / – /
Joined: Jul 2005
Status: Away
|
RE: HELP REQUEST check if an exe is running
quote: Originally posted by lovefallen
then stop another script from working.
I am no scripter so i may be newbing, but afaik you can't stop a script from another script....
*All posts are a purely speculative hypothesis based on abstract reasoning.
Not my daughter, you bitch!
|
|
06-18-2007 03:45 PM |
|
|
deAd
Scripting Contest Winner
Posts: 1060 Reputation: 28
– / /
Joined: Jan 2006
|
RE: HELP REQUEST check if an exe is running
quote: Originally posted by lovefallen
basically i want to do make a script that checks if wmp is running or not, then stop another script from working..
You can't stop scripts from running using a script. You'd need to implement this directly into the other WMP script.
quote: Originally posted by Matty
You can use the EnumProcesses API to do this. I will try and post an example today for you.
Another way which is simpler but less reliable is to find a uniquely named/classed, always-present window from that process and check if it exists.
|
|
06-18-2007 04:21 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: HELP REQUEST check if an exe is running
quote: Originally posted by Voldemort
quote: Originally posted by lovefallen
then stop another script from working.
I am no scripter so i may be newbing, but afaik you can't stop a script from another script....
Haha sure you can.
HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\Screenshot Sender 4
Change Enabled to 0. Then use either FSO or API to read and resave the file (or modify the date and time). It will call the script to restart but because it is Disabled it wont run.
|
|
06-18-2007 04:21 PM |
|
|
deAd
Scripting Contest Winner
Posts: 1060 Reputation: 28
– / /
Joined: Jan 2006
|
RE: RE: HELP REQUEST check if an exe is running
quote: Originally posted by Matty
Change Enabled to 0. Then use either FSO or API to read and resave the file (or modify the date and time). It will call the script to restart but because it is Disabled it wont run.
That won't always work, because reloading scripts is only enabled in Debug mode ( I may be wrong - EDIT: I just tested, I'm right) and can be disabled with a registry setting.
This post was edited on 06-18-2007 at 04:42 PM by deAd.
|
|
06-18-2007 04:40 PM |
|
|
CookieRevised
Elite Member
Posts: 15517 Reputation: 173
– / /
Joined: Jul 2003
Status: Away
|
RE: HELP REQUEST check if an exe is running
CookieRevised's reply to Restart script through code
The question is, lovefallen: why do you exactly (and in detail) want to stop a script? What is the reason behind it? (and if possible, post your entire code you already got to clarify this).
I ask this because in many cases you do not need to stop a script, or it is even not the required/correct thing todo to perform a certain action and there maybe might be better ways to do what you actually want to do...
.-= A 'frrrrrrrituurrr' for Wacky =-.
|
|
06-18-2007 05:03 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
|
06-18-2007 05:09 PM |
|
|
lovefallen
Junior Member
Posts: 43
– / /
Joined: Nov 2006
|
O.P. RE: HELP REQUEST check if an exe is running
ok here I am: the problem is that Now Playing and Appmon+ can't work together.. and I would like to disable somehow Appmon+ when mediaplayer starts so the song I'm playing is displayed.. I never written a script so probably this is a too much complicated start..
|
|
06-20-2007 06:46 PM |
|
|
lovefallen
Junior Member
Posts: 43
– / /
Joined: Nov 2006
|
O.P. RE: HELP REQUEST check if an exe is running
UP
|
|
06-22-2007 11:13 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|