Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #IfWinActive, ahk_class _EverQuestwndclass
- $^=::
- WinSet, Style, -0xC00000,a
- winmove, ahk_class _EverQuestwndclass, , 0, 0 , 2560, 1440
- clipcursor(winexist("ahk_class _EverQuestwndclass") ? winexist("a") : "")
- return
- #IfWinActive
- clipcursor(hwnd := "") {
- static unclip := DllCall("GetCursor")
- if hwnd {
- ;WinHide ahk_class _EverQuestwndclass
- WinGetPos, rx, ry, rw, rh, ahk_id %hwnd%
- WinGet style, style, ahk_id %hwnd%
- if style & 0xc00000 { ; bordered window, use client area
- SysGet cap, 4 ; caption height
- SysGet bw, 32 ; border width
- SysGet bh, 33 ; border height
- rx += bw, ry += cap, rw -= (bh * 2), rh -= (cap + bh)
- }
- VarSetCapacity(rclip, 16)
- NumPut(rx, &rclip+0)
- NumPut(ry, &rclip+4)
- NumPut(rw + rx, &rclip+8)
- NumPut(rh + ry, &rclip+12)
- } else
- WinShow ahk_class _EverQuestwndclass
- return DllCall("ClipCursor", Ptr, hwnd ? &rclip : &unclip)
- }
Advertisement
Add Comment
Please, Sign In to add comment