What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP REQUEST check if an exe is running

Pages: (2): « First [ 1 ] 2 » Last »
HELP REQUEST check if an exe is running
Author: Message:
lovefallen
Junior Member
**


Posts: 43
– / Male / Flag
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! :)
[Image: signatureoo2.png]
06-17-2007 07:34 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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
Profile E-Mail PM Find Quote Report
Voldemort
Veteran Member
*****

Avatar

Posts: 3504
Reputation: 49
– / – / Flag
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!
[Image: ico-mollytrix16.gif]
06-18-2007 03:45 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
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
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
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
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
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
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: HELP REQUEST check if an exe is running
Please see Eljay's reply to if (program.open)... for an example of how to check if a process is running.
06-18-2007 05:09 PM
Profile PM Find Quote Report
lovefallen
Junior Member
**


Posts: 43
– / Male / Flag
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..
[Image: signatureoo2.png]
06-20-2007 06:46 PM
Profile E-Mail PM Find Quote Report
lovefallen
Junior Member
**


Posts: 43
– / Male / Flag
Joined: Nov 2006
O.P. RE: HELP REQUEST check if an exe is running
UP
[Image: signatureoo2.png]
06-22-2007 11:13 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On