Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- CoordMode, Pixel, Screen
- plik = ustawienia.ini
- ifExist, %plik%
- {
- IniRead, PixelColorX, %plik%, Gui, PixelColorX
- IniRead, PixelColorY,%plik%, Gui, PixelColorY
- }
- else
- {
- PixelColorX := 200
- PixelColorY := 200
- }
- Sleep, 15
- Gui, PixelColor: Destroy
- Gui, PixelColor: -Caption +AlwaysOnTop +LastFound +ToolWindow +hWndPixelColorID
- Gui, PixelColor: Color, 805030
- Gui, PixelColor: Add, Picture, x0 y0 gUImove, cross.png
- WinSet, TransColor, 805030 255
- Gui, PixelColor: Font, s12, FixedSys
- Gui, PixelColor: Add, Text, x45 y0 w140 cFF00FF vPixelColorTextX, X: 1000
- Gui, PixelColor: Add, Text, x45 y13 w140 cFF00FF vPixelColorTextY, Y: 1000
- Gui, PixelColor: Font, s15 FF0000
- Gui, PixelColor: Add, Progress, x45 y28 w30 h30 Disabled BackgroundC4AF626 +Border vPixColor, Test
- ;;Gui, PixelColor: Add, Text, x36 y36 w30 h30 BackgroundTrans 0x201 cFF0000 +Border, Test
- Gui, PixelColor: Show, x%PixelColorX% y%PixelColorY% h62 w140
- SetTimer, PixColorCurrent, 200
- IDC_APPSTARTING := 32650
- IDC_ARROW := 32512
- IDC_CROSS := 32515
- IDC_HAND := 32649
- IDC_HELP := 32651
- IDC_IBEAM := 32513
- IDC_NO := 32648
- IDC_SIZEALL := 32646
- IDC_SIZENESW := 32643
- IDC_SIZENS := 32645
- IDC_SIZENWSE := 32642
- IDC_SIZEWE := 32644
- IDC_UPARROW := 32516
- IDC_WAIT := 32514
- hCursor:=DllCall("LoadCursor", "UInt", NULL,"Int", IDC_HAND, "UInt")
- OnMessage(0x200,"WM_MOUSEMOVE")
- return
- Return
- PixColorCurrent:
- WinGetPos, PixelColorX, PixelColorY,,,ahk_id %PixelColorID%
- ;;PixColorColor = FF0000
- PixelGetColor, PixColorColor, % PixelColorX + 25, % PixelColorY + 25, Fast RGB
- ;;Gui, PixelColor: Add, Progress, x36 y36 w50 h50 Disabled BackgroundC4AF626 vPixColor
- GuiControl, PixelColor:+Background%PixColorColor%,PixColor
- GuiControl, PixelColor:,PixelColorTextX, % "X: " . PixelColorX + 25
- GuiControl, PixelColor:,PixelColorTextY, % "Y: " . PixelColorY + 25
- ;;GuiControl, PixelColor:,PixColor,%PixelColorX%
- Return
- UImove:
- PostMessage, 0xA1,2,,,A
- Return
- F11::
- Reload
- F12::
- ExitApp
- GuiClose:
- DllCall("DestroyCursor","Uint", hCursor)
- ExitApp
- WM_MOUSEMOVE(wParam, lParam) {
- global hCursor
- MouseGetPos,,,, ctrl
- if (ctrl == "Button1")
- DllCall("SetCursor","UInt",hCursor) ; To set the cursor
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement