Advertisement
S1L1R

utils

Jan 24th, 2023 (edited)
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Excludes stupid values' usage
  2. Clamp(num, min, max)
  3. {
  4.     return num > max ? max : num < min ? min : num
  5. }
  6.  
  7. MouseMove(move_x, move_y)
  8. {
  9.     DllCall("mouse_event", "UInt", 1, "Int", move_x, "Int", move_y, "UInt", 0, "Int", 0)
  10.     return
  11. }
  12.  
  13. ; Accurate values
  14. minSleepTime := Clamp(Round(1000 / fps), 1, 60)
  15.  
  16. gScreen := Array( Ceil(A_ScreenWidth), Ceil(A_ScreenHeight) )
  17. gScreenCenter := Array( Ceil(A_ScreenWidth / 2), Ceil(A_ScreenHeight / 2) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement