- 1 year ago
AHK find pid of explorer.exe?
Comment
1 / 1
To find the PID (Process ID) of the explorer.exe
process using AutoHotkey (AHK), you can use the Process
command along with the Exist
sub-command. Here's an example script:
autohotkeyProcess, Exist, explorer.exe
MsgBox, The PID of explorer.exe is %ErrorLevel%
The Process, Exist, explorer.exe
line checks if the explorer.exe
process is running and sets the ErrorLevel
variable to the PID if it exists. The MsgBox
line displays the PID in a message box.
Save the script with a .ahk
extension and run it using AutoHotkey. It will display the PID of the explorer.exe
process if it is running.