Jump to content


Photo

[How to] Retrieve a script's PID


  • Please log in to reply
2 replies to this topic

#1 SKAN

SKAN
  • Administrators
  • 9062 posts

Posted 01 July 2006 - 09:05 PM

How to retrieve a script's PID ?
http://www.autohotke...pic.php?t=86420

The usual way is a two-liner (AHK Documentation) :

Process, Exist
PID := errorlevel
; MsgBox, %PID%

Here is a One-Liner

PID:=DllCall("GetCurrentProcessId")
; MsgBox, %PID%



I wish that this one-liner be mentioned in AHK Documentation - remarks paragraphs of Process command.

Regards, :)

#2 Chris

Chris
  • Administrators
  • 10727 posts

Posted 02 July 2006 - 12:03 AM

Thanks; I've documented it on the Process page.

#3 SKAN

SKAN
  • Administrators
  • 9062 posts

Posted 02 July 2006 - 09:31 AM

Thanks; I've documented it on the Process page.


Thanks :D