Advertisement
se7enek

Untitled

Jul 16th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5.  
  6. CoordMode, Pixel, Screen
  7.  
  8. plik = ustawienia.ini
  9.  
  10. ifExist, %plik%
  11. {
  12. IniRead, PixelColorX, %plik%, Gui, PixelColorX
  13. IniRead, PixelColorY,%plik%, Gui, PixelColorY
  14. }
  15. else
  16. {
  17. PixelColorX := 200
  18. PixelColorY := 200
  19. }
  20. Sleep, 15
  21.  
  22. Gui, PixelColor: Destroy
  23. Gui, PixelColor: -Caption +AlwaysOnTop +LastFound +ToolWindow +hWndPixelColorID
  24. Gui, PixelColor: Color, 805030
  25. Gui, PixelColor: Add, Picture, x0 y0 gUImove, cross.png
  26. WinSet, TransColor, 805030 255
  27. Gui, PixelColor: Font, s12, FixedSys
  28. Gui, PixelColor: Add, Text, x45 y0 w140 cFF00FF vPixelColorTextX, X: 1000
  29. Gui, PixelColor: Add, Text, x45 y13 w140 cFF00FF vPixelColorTextY, Y: 1000
  30.  
  31. Gui, PixelColor: Font, s15 FF0000
  32. Gui, PixelColor: Add, Progress, x45 y28 w30 h30 Disabled BackgroundC4AF626 +Border vPixColor, Test
  33. ;;Gui, PixelColor: Add, Text, x36 y36 w30 h30 BackgroundTrans 0x201 cFF0000 +Border, Test
  34.  
  35. Gui, PixelColor: Show, x%PixelColorX% y%PixelColorY% h62 w140
  36. SetTimer, PixColorCurrent, 200
  37.  
  38.  
  39.  
  40. IDC_APPSTARTING := 32650
  41.  
  42. IDC_ARROW := 32512
  43.  
  44. IDC_CROSS := 32515
  45.  
  46. IDC_HAND := 32649
  47.  
  48. IDC_HELP := 32651
  49.  
  50. IDC_IBEAM := 32513
  51.  
  52. IDC_NO := 32648
  53.  
  54. IDC_SIZEALL := 32646
  55.  
  56. IDC_SIZENESW := 32643
  57.  
  58. IDC_SIZENS := 32645
  59.  
  60. IDC_SIZENWSE := 32642
  61.  
  62. IDC_SIZEWE := 32644
  63.  
  64. IDC_UPARROW := 32516
  65.  
  66. IDC_WAIT := 32514
  67.  
  68. hCursor:=DllCall("LoadCursor", "UInt", NULL,"Int", IDC_HAND, "UInt")
  69.  
  70. OnMessage(0x200,"WM_MOUSEMOVE")
  71.  
  72. return
  73.  
  74.  
  75.  
  76.  
  77. Return
  78.  
  79. PixColorCurrent:
  80. WinGetPos, PixelColorX, PixelColorY,,,ahk_id %PixelColorID%
  81. ;;PixColorColor = FF0000
  82.  
  83. PixelGetColor, PixColorColor, % PixelColorX + 25, % PixelColorY + 25, Fast RGB
  84.  
  85. ;;Gui, PixelColor: Add, Progress, x36 y36 w50 h50 Disabled BackgroundC4AF626 vPixColor
  86. GuiControl, PixelColor:+Background%PixColorColor%,PixColor
  87. GuiControl, PixelColor:,PixelColorTextX, % "X: " . PixelColorX + 25
  88. GuiControl, PixelColor:,PixelColorTextY, % "Y: " . PixelColorY + 25
  89.  
  90.  
  91. ;;GuiControl, PixelColor:,PixColor,%PixelColorX%
  92. Return
  93.  
  94. UImove:
  95. PostMessage, 0xA1,2,,,A
  96. Return
  97.  
  98. F11::
  99. Reload
  100.  
  101.  
  102. F12::
  103. ExitApp
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. GuiClose:
  113.  
  114. DllCall("DestroyCursor","Uint", hCursor)
  115.  
  116. ExitApp
  117.  
  118. WM_MOUSEMOVE(wParam, lParam) {
  119.  
  120. global hCursor
  121.  
  122. MouseGetPos,,,, ctrl
  123.  
  124. if (ctrl == "Button1")
  125.  
  126. DllCall("SetCursor","UInt",hCursor) ; To set the cursor
  127.  
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement