ProcessClose

From AutoIt Wiki

Jump to: navigation, search

Terminates a named process. Adapted from AutoIt doc.

Contents

Syntax

ProcessClose("proc")

Parameters

ParamPurpose
procThe title or PID of the process to terminate.

Process

Every time an executable is executed, it is given a unique process identification number (PID) to define it's position in both heirarchy of job queue and memory positioning. If a Process path name is used instead of the ID then ProcessClose() will terminate the highest PID regardless of spawn sequence.

(Note: In order to work under Windows NT 4.0, ProcessClose requires the file PSAPI.DLL which is included in the AutoIt installation directory.)

The process is polled approx. every 250 milliseconds.

Return Values

None.

Example

$pid = Run("notepad.exe")
MsgBox(0,"PID",$pid & " => notepad.exe")
ProcessClose($pid)  ; equivalent to ProcessClose("notepad.exe")
Personal tools