Guest User

Untitled

a guest
Jul 22nd, 2020
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #IfWinActive, ahk_class _EverQuestwndclass
  2. $^=::
  3. WinSet, Style, -0xC00000,a
  4. winmove, ahk_class _EverQuestwndclass, , 0, 0 , 2560, 1440
  5. clipcursor(winexist("ahk_class _EverQuestwndclass") ? winexist("a") : "")
  6. return
  7. #IfWinActive
  8.  
  9. clipcursor(hwnd := "") {
  10. static unclip := DllCall("GetCursor")
  11. if hwnd {
  12. ;WinHide ahk_class _EverQuestwndclass
  13. WinGetPos, rx, ry, rw, rh, ahk_id %hwnd%
  14. WinGet style, style, ahk_id %hwnd%
  15. if style & 0xc00000 { ; bordered window, use client area
  16. SysGet cap, 4 ; caption height
  17. SysGet bw, 32 ; border width
  18. SysGet bh, 33 ; border height
  19. rx += bw, ry += cap, rw -= (bh * 2), rh -= (cap + bh)
  20. }
  21. VarSetCapacity(rclip, 16)
  22. NumPut(rx, &rclip+0)
  23. NumPut(ry, &rclip+4)
  24. NumPut(rw + rx, &rclip+8)
  25. NumPut(rh + ry, &rclip+12)
  26. } else
  27. WinShow ahk_class _EverQuestwndclass
  28. return DllCall("ClipCursor", Ptr, hwnd ? &rclip : &unclip)
  29. }
Advertisement
Add Comment
Please, Sign In to add comment