[AHK-] 視窗控制
這是我常用的一些控制視窗的小功能
win+v 將視窗置中
win+ctrl+v 調整大小為800x600並將視窗置中
win+方向鍵 移動視窗位置
win+1/2/3 切換視窗透明度並且置頂
win+4 切換置頂
--8<------
;center active window
#V::
WinGetPos, , , WinWidth, WinHeight, A
WinMove, A, , (A_ScreenWidth/2)-(WinWidth/2), (A_ScreenHeight/2)-(WinHeight/2)
return
#^V:: ;800x600
WinMove, A, , (A_ScreenWidth/2)-(800/2), (A_ScreenHeight/2)-(600/2), 800, 600
return
;move active window
#Left::MoveWindow(-1, 0)
#Right::MoveWindow(1, 0)
#Up::MoveWindow(0, -1)
#Down::MoveWindow(0, 1)
MoveWindow(dx, dy){
WinGetPos, WinPosX, WinPosY, , , A
WinMove, A, , WinPosX+dx, WinPosY+dy
return
}
;toggle alwaysontop & transparency
#1::SetTransparency(64)
#2::SetTransparency(128)
#3::SetTransparency(192)
#4::WinSet, AlwaysOnTop, toggle, A
SetTransparency(trans){
WinGet, Transparency, Transparent, A
If Transparency
WinSet, Transparent, Off, A
else
WinSet, Transparent, %trans%, A
WinSet, AlwaysOnTop, toggle, A
return
}
--8<------
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.92.221
推
07/21 18:46, , 1F
07/21 18:46, 1F
推
10/17 10:47, , 2F
10/17 10:47, 2F
EzHotKey 近期熱門文章
PTT數位生活區 即時熱門文章