作者hinet60613 (小呆维)
站内EzHotKey
标题[AHK-] 将滑鼠锁定在视窗内
时间Mon Mar 4 01:59:24 2013
因为同学在问要怎麽把滑鼠锁在视窗内
就做了这个AHK
总之分享一下XD
https://dl.dropbox.com/u/39222236/mouse.exe
点开档案後会自动执行
按Alt+Z会结束
当游标超出当前视窗时会自己拉回来
--以下为原始码--
#persistent
SetTimer, WatchCurser, 50
return
!z::ExitApp
WatchCurser:
MouseGetPos, xpos, ypos
WinGetActiveStats, NowTitle, Width, Height, X, Y
NewX = %xpos%
NewY = %ypos%
Change = 0
if(NewX < 0){
NewX = 0
Change = 1
}
if(NewX > Width){
NewX = %Width%
Change = 1
}
if(NewY < 0){
NewY = 0
Change = 1
}
if(NewY > Height){
NewY = %Height%
Change = 1
}
if(Change = 1)
MouseMove NewX, NewY
return
--以上为原始码--
--
_,._
゚Å゚)<你再说一次看看
⊂彡☆))Д′)<先承认你就是你朋……
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.190.96
1F:→ kslman:GOOD 03/04 13:35
2F:→ aspect167:我想问SetTimer或Loop会不会让电脑变慢? 03/05 01:09
3F:推 kslman:没写出很奇怪的回圈应该都还好 03/05 13:26
4F:→ aspect167:想请问Loop可用break中断, SetTimer呢? 或能设运作几次? 03/05 14:10