WinMove, X, Y - by Process PID ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
dzur
Posts: 71
Joined: 15 Jul 2016, 10:44

WinMove, X, Y - by Process PID ?

18 Jan 2018, 19:14

Hello,
Can I move a window by referencing its Process PID variable=%NewPID% ?

Code: Select all

F3::
Process, wait, calc.exe, 5.5
NewPID = %ErrorLevel%  ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0
{
    MsgBox The specified process did not appear within 5.5 seconds.
    return
}
; Otherwise:
MsgBox A matching process has appeared (Process ID is %NewPID%).
;Next Line is Where I need the CODE To Move the Process PID's Window - WHAT TO DO ?
; ???
;------------------------------------
WinMove, %NewPID%, ,200, 150
;-----------------------------------
; ???
;
Please Help.

Thank You.
dzur
User avatar
boiler
Posts: 16929
Joined: 21 Dec 2014, 02:44

Re: WinMove, X, Y - by Process PID ?

18 Jan 2018, 19:30

WinMove, ahk_pid %NewPID%, ,200, 150

See the WinTitle documentation.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Decar, doodles333, mikeyww and 223 guests