Advertisement
Guest User

Untitled

a guest
Feb 15th, 2020
2,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1.  
  2. 1::Grabscreenregion()
  3.  
  4.  
  5.  
  6.  
  7.  
  8. ; Where
  9. ; [Name] := GAP(0.x, 0.y)
  10. ; 0.5 is the mid, 0 is the edge, and 1 is the furthest position
  11. ; for the screen region. This will make scaling for different
  12. ; users with differing resolutions have hopefully a more consistent exp.
  13. ; Using this function will attach the exact position of the cursor when activated
  14. ; While also saving the position in the proper formatting to the clipboard
  15. ; For QoL to designing actions.
  16. Grabscreenregion() {
  17. BlockInput On
  18. MouseGetPos, gx, gy
  19. WinGetPos,,, maxx, maxy
  20. CalcRatiox := round((gx / maxx) , 2)
  21. CalcRatioy := round((gy / maxy) , 2)
  22. clipboard := " := GAP(" CalcRatiox ", " CalcRatioy ")"
  23. Tooltip, "pos (%CalcRatiox%`,%CalcRatioy%) saved.", gx-50, gy-25
  24. SetTimer, RemoveToolTip, -5000
  25. BlockInput Off
  26. return
  27. RemoveToolTip:
  28. ToolTip
  29. return
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement