Announcement
Collapse
No announcement yet.
SetForegroundWindow by PID
Collapse
X
-
PHP Code:FindWindow $0 ....
System::Call 'USER32::GetWindowThreadProcessId(p$0,*i0r1)'
${If} $1 = $mypid ...
Leave a comment:
-
-
SetForegroundWindow by PID
Hello everyone, this is my first post so please be gentle - if there is something wrong about the question format, let me know.
My intention is to bring a window back to foreground with my Process ID.
Here is what I'v found so far:
It works, but to make absolutely sure choosing the correct application (in case of multilingual or same name of windows), I would rather bring the window to foreground providing the process ID, not the window class or the title. I already have my necessary PID.code:
Function .onGUIEnd
FindWindow $0 "WindowClass" "Title"
IsWindow $0 0 +2
System::Call 'user32::SetForegroundWindow(i r0)'
Do you have any ideas how I can perform the SetForegroundWindow with PID?
Leave a comment: