Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[How to] Retrieve a script's PID


  • Please log in to reply
2 replies to this topic
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
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, :)
kWo4Lk1.png

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks; I've documented it on the Process page.

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

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


Thanks :D
kWo4Lk1.png