Doh! Well, I found another clever method, wish I'd have known about that 10 minutes ago I used something along the lines of $pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int_ptr", 0) EDIT: I also suggest the Help file be updated, seems like it didn't list many ways and thats why I was confused.