Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CoordMode, Mouse
- CoordMode, Pixel
- Gui, -Caption +ToolWindow +AlwaysOnTop
- Options = FF0000 x-1 y-1|00FF00 x99 y-1|FFFF00 x-1 y99|0000FF x99 y99
- Loop, parse, Options, |
- {
- Gui, Add, Progress, % "background" A_LoopField " w102 h102 hwndhProgress" A_Index
- Control, ExStyle, -0x20000,, % "ahk_id" hProgress%A_Index% ; WS_EX_STATICEDGE = 0x20000
- }
- Gui, Show, % "x" (A_ScreenWidth - 200)//2 " y" (A_ScreenHeight - 200)//2 " w200 h200"
- Sleep, 500
- Gui, 2:+LastFound -Caption +ToolWindow +Owner1
- Gui, 2:Color, Black
- WinSet, Transparent, 150
- PosX := (A_ScreenWidth - 100)//2
- PosY := (A_ScreenHeight - 100)//2
- Gui, 2:Show, x%PosX% y%PosY% w100 h100
- Sleep, 500
- SetTimer, PixelGetColor, 10
- Loop 4
- {
- MouseMove, PosX + (mod(A_Index, 2) ? 25 : 75), PosY + (A_Index > 2 ? 75 : 25)
- Sleep, 1000
- }
- OnMessage(0x201, "WM_LBUTTONDOWN")
- Return
- PixelGetColor:
- MouseGetPos, X, Y
- PixelGetColor, Color, X, Y, RGB
- ToolTip, % Color
- Return
- Esc:: ExitApp
- WM_LBUTTONDOWN()
- {
- PostMessage, WM_NCLBUTTONDOWN := 0xA1, HTCAPTION := 2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement