autohotkey.ahk 720 B

1234567891011121314151617181920212223242526272829303132333435
  1. #NoEnv
  2. SetBatchLines -1
  3. CoordMode Mouse, Screen
  4. OnExit GuiClose
  5. zoom := 9
  6. computeSize(){
  7. global as_x
  8. as_x := Round(ws_x/zoom/2 - 0.5)
  9. if (zoom>1) {
  10. pix := Round(zoom)
  11. } ele {
  12. pix := 1
  13. }
  14. ToolTip Message %as_x% %zoom% %ws_x% %hws_x%
  15. }
  16. hdc_frame := DllCall("GetDC", UInt, MagnifierID)
  17. ; comment
  18. DrawCross(byRef x="", rX,rY,z, dc){
  19. ;specify the style, thickness and color of the cross lines
  20. h_pen := DllCall( "gdi32.dll\CreatePen", Int, 0, Int, 1, UInt, 0x0000FF)
  21. }
  22. ;Ctrl ^; Shift +; Win #; Alt !
  23. ^NumPadAdd::
  24. ^WheelUp::
  25. ^;:: ;comment
  26. If(zoom < ws_x and ( A_ThisHotKey = "^WheelUp" or A_ThisHotKey ="^NumPadAdd") )
  27. zoom *= 1.189207115 ; sqrt(sqrt(2))
  28. Gosub,setZoom
  29. return