-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmousePosColorTooltip.ahk
48 lines (40 loc) · 1.08 KB
/
mousePosColorTooltip.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Requires AutoHotkey v1
#Warn
#NoEnv
#SingleInstance, Force
SendMode, Input
SetBatchLines, -1
SetWorkingDir, %A_ScriptDir%
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
convert := True
Loop {
MouseGetPos, posX, posY
PixelGetColor, color, %posX%, %posY%
color := StrReplace(color, "0x")
RegExMatch(color, "(.{2})(.{2})(.{2})", colors) ; BGR TO RGB
; ToolTip, %posX%`n%posY%`n%colors3%`n%colors2%`n%colors1% ;`n%A_Hour%:%A_Min%:%A_Sec%
If (convert) {
ToolTip, X: %posX%`nY: %posY%`nR: %colors3%`nG: %colors2%`nB: %colors1%`nConvert: %convert%
}
Else {
ToolTip, X: %posX%`nY: %posY%`nR: %colors1%`nG: %colors2%`nB: %colors3%`nConvert: %convert%
}
}
^LButton::
Clipboard=%posX%, %posY%
Return
+LButton::
If (convert) {
Clipboard=%colors3%%colors2%%colors1%
}
Else {
Clipboard=%colors1%%colors2%%colors3%
}
Return
^!CapsLock::
convert := !convert
Return
;~ -----------------------------------------------------
!+CapsLock::Suspend
^!CapsLock::ExitApp