Advertisement
teadrinker

Untitled

Mar 29th, 2011
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    CoordMode, Mouse
  2.    CoordMode, Pixel
  3.  
  4.    Gui, -Caption +ToolWindow +AlwaysOnTop
  5.    Options = FF0000 x-1 y-1|00FF00 x99 y-1|FFFF00 x-1 y99|0000FF x99 y99
  6.    Loop, parse, Options, |
  7.    {
  8.       Gui, Add, Progress, % "background" A_LoopField " w102 h102 hwndhProgress" A_Index
  9.       Control, ExStyle, -0x20000,, % "ahk_id" hProgress%A_Index%   ; WS_EX_STATICEDGE = 0x20000
  10.    }
  11.    Gui, Show, % "x" (A_ScreenWidth - 200)//2 " y" (A_ScreenHeight - 200)//2 " w200 h200"
  12.    Sleep, 500
  13.  
  14.    Gui, 2:+LastFound -Caption +ToolWindow +Owner1
  15.    Gui, 2:Color, Black
  16.    WinSet, Transparent, 150
  17.  
  18.    PosX := (A_ScreenWidth - 100)//2
  19.    PosY := (A_ScreenHeight - 100)//2
  20.  
  21.    Gui, 2:Show, x%PosX% y%PosY% w100 h100
  22.    Sleep, 500
  23.    SetTimer, PixelGetColor, 10
  24.  
  25.    Loop 4
  26.    {
  27.       MouseMove, PosX + (mod(A_Index, 2) ? 25 : 75), PosY + (A_Index > 2 ? 75 : 25)
  28.       Sleep, 1000
  29.    }
  30.    OnMessage(0x201, "WM_LBUTTONDOWN")
  31.    Return
  32.  
  33. PixelGetColor:
  34.    MouseGetPos, X, Y
  35.    PixelGetColor, Color, X, Y, RGB
  36.    ToolTip, % Color
  37.    Return
  38.  
  39. Esc:: ExitApp
  40.  
  41. WM_LBUTTONDOWN()
  42. {
  43.    PostMessage, WM_NCLBUTTONDOWN := 0xA1, HTCAPTION := 2
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement