GetProcessID
int GetProcessID(String executableName)Description
Returns the process ID (PID) of a running process identified by its executable name.
The function searches through all running processes and returns the PID of the first match.
The comparison is case-insensitive.
If the process is not found, 0 is returned.
Parameter
- executableName - The name of the executable to search for (e.g. "notepad.exe").
Return
- int - The process ID of the found process, or 0 if no matching process was found.
Example
void main()
{
int pid = GetProcessID("notepad.exe");
if (pid != 0)
{
Print("Process found with PID: " + pid);
}
}