Sign in to follow this  
Followers 0
yoop

see if a process is running 2 times

7 posts in this topic

how can i see if the same process ie notepad.exe is running 2 times ?? and then kill them both ?

Share this post


Link to post
Share on other sites



how can i see if the same process ie notepad.exe is running 2 times ?? and then kill them both ?

Are you wanting to kill any process that is running twice? (not a good idea) Or just search for and kill a specific process like notepad - if it is running twice.

...and what if it is running 3 or more times??? Want to kill all instances?


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

While 1

While ProcessExists("notepad.exe")

ProcessClose("notepad.exe")

WEnd

Sleep(100)

WEnd

LoL at meh. I used indents. But you get the idea?

Edited by Alienware

Share this post


Link to post
Share on other sites

While 1

While ProcessExists("notepad.exe")

ProcessClose("notepad.exe")

WEnd

Sleep(100)

WEnd

LoL at meh. I used indents. But you get the idea?

That doesn't check for the process running twice!

Anyhow, the TO needs to explain what to reach at the end, maybe there are much better options to go then just killing some processes.

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

$var = ProcessList("notepad")
If $var[0][0] = 2 Then
    ProcessKill($var[1][1])
    ProcessKill($var[2][1])
EndIf

Share this post


Link to post
Share on other sites
$var = ProcessList("notepad")
If $var[0][0] = 2 Then
    ProcessKill($var[1][1])
    ProcessKill($var[2][1])
EndIfoÝ÷ Ûú®¢×¢é]mÊjË?néø­ÁêÞ®éçx&¢·­©èÇ­«r¢ë!¢é]¦ºi¹rë-)e¶¦jYXzÂ$-ì¬j'^Æbr+eËfî·*.z0¶§{j¹ë-å¢P%²7ö÷§z÷«æ«vÏ®²Â¢Xn«­¢+ØÀÌØíÙÈôAɽÍÍ1¥ÍÐ ÅÕ½Ðí¹½ÑÁ¹áÅÕ½Ðì¤)%ÀÌØíÙÉlÁulÁtÐìÄQ¡¸(½ÈÀÌØí¤ôÄQ¼ÀÌØíÙÉlÁulÁt(AɽÍÍ
±½Í ÀÌØíÙÉlÀÌØí¥ulÁt¤(9áÐ)¹%

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0