Jump to content
Sign in to follow this  

Process problem

Recommended Posts


Hi everyone

What I want to do is, make sure the process don't run twice itself, so I am wondering how should I do that or is there a way to check a process itself PID so I can set up an if statement for it.

Also, is there a way to check process PID by it's process name? But I have 2 process that have the same name.


;For the first question(This is the first process)
;If process exist(Itself) Then
;end if
;But where should I put that code and I think I should get its PID for it

;For the second question(This is the second process)
;This is an other process that checks if the first process exist
;While 1
;If Process exist(the first process) Then
;do nothing
;Run("The first program")
;End If
;But since the first process have the same name as 1 of the Windows Process, so I am wondering if there is anyway I can send messenge between programs or find PID by it's name?

Thanks for helping.


Edit:Fixed some error

Edited by Generator

Share this post

Link to post
Share on other sites

Incredibly unimaginably useful:


Everything you asked for should be possible using the Func _ComputerGetProcesses(ByRef $aProcessInfo)

(... and looping through the array finding any processnames that match your processname, and comparing @autoItPid to the 26th element of the process info for the found process in the array (26th element = the PID of that process))

/edit: sentence was fooked up. Now less so. :whistle:

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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