作者rexx ()
站内EzHotKey
标题[AHK-] 视窗控制
时间Sun Jul 20 13:10:17 2008
这是我常用的一些控制视窗的小功能
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
1F:推 emethxyz:这个很好用呢,怎麽没人推XD 07/21 18:46
2F:推 alicelee1218:隔好久推 好用 10/17 10:47