by llinfeng » 24 Feb 2021, 13:47
有个笨办法,要调WinMove的具体参数。下面是一个例子,把当前的活动窗口放大到指定大小并移动
Code: Select all
max_to_two_monitors:
; Left-X, Height-Upper, Width, Height-Bottom
WinMove, A, , 1192, -35, 2415, 1958 ;Now with no Windows task bar
return
多窗口和多显示器的话,可以多写几个这样的 label,按顺序激活指定的窗口并移动。
可以是这样的结构:可能该用另一种 IfWin 的 function,这里的例子,IfWinExist 该是错的。
Code: Select all
move_8_monitors:
SetTitleMatchMode, 2
IfWinExist, 第一个窗口的名字
WinActivate, 第一个窗口的名字
Gosub, max_to_two_monitors
...
return
有个笨办法,要调WinMove的具体参数。下面是一个例子,把当前的活动窗口放大到指定大小并移动
[Codebox=autohotkey file=Untitled.ahk]
max_to_two_monitors:
; Left-X, Height-Upper, Width, Height-Bottom
WinMove, A, , 1192, -35, 2415, 1958 ;Now with no Windows task bar
return
[/Codebox]
多窗口和多显示器的话,可以多写几个这样的 label,按顺序激活指定的窗口并移动。
可以是这样的结构:可能该用另一种 IfWin 的 function,这里的例子,IfWinExist 该是错的。
[Codebox=autohotkey file=Untitled.ahk]
move_8_monitors:
SetTitleMatchMode, 2
IfWinExist, 第一个窗口的名字
WinActivate, 第一个窗口的名字
Gosub, max_to_two_monitors
...
return
[/Codebox]