问题
How can i Move and Resize a Application with Autohotkey Languages.
1 - i want to run a application, and then
2 - resize it in a Width Height Value,
3 - on the Windows Desktop with a position in a x y coordinate.
i Can run a Application and do a Autohotkey Keyboard Shortcut Macro to move the Window but How Can i Resize a Window With a Width Height Value.
the Autohotkey code so far, looks like this.
; [^ = Ctrl] [+ = Shift] [! = Alt] [# = Win]
f5::
RunWait "C:\test.txt"
send !{space}m
send {left}
Mousemove 500,250
MouseClick left,0,0
return
回答1:
Look at the ahk documentation for WinWait and WinMove. The documentation for run gives details on storing the newly launched programs Process ID.
The below moves the window to 500x, 250y and resizes it to 200w x 100h.
f5::
run, C:\test.txt, , , o_pid
WinWait, ahk_pid %o_pid%
WinMove, ahk_pid %o_pid%, ,500, 250, 200, 100
return
来源:https://stackoverflow.com/questions/48049224/move-and-resize-a-application-autohotkey