;Version 1.0
;First Release
#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.
AutoPot = off
XPos = 0
YPos = 0
PixelColor = 0
NumPad1::
If AutoPot = off
{
AutoPot = on
MouseGetPos, XPos, YPos
PixelGetColor, PixelColor, %XPos%, %YPos%
SetTimer, AutoPot, 100
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
} else If AutoPot = on
{
AutoPot = off
SetTimer, AutoPot, Off
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
sleep 100
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
}
return
AutoPot:
PixelGetColor, PixelColor2, %XPos%, %YPos%
If (PixelColor == PixelColor2)
{
;ToolTipDisplay("Matched" . PixelColor . " x" . PixelColor2)
} Else {
if WinActive("ahk_exe Trove.exe")
{
Send q
ToolTipDisplay("Trying to use a pot.")
}
}
return
ToolTipDisplay(Message) {
ToolTip, %Message%
SetTimer, RemoveToolTip, 5000
return
}
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return