Skip to content

Instantly share code, notes, and snippets.

@kizernis
Last active September 2, 2018 12:23
Show Gist options
  • Save kizernis/7d0761e136887970100016444cea9031 to your computer and use it in GitHub Desktop.
Save kizernis/7d0761e136887970100016444cea9031 to your computer and use it in GitHub Desktop.
#NoEnv
SendMode Event
/*
v := ComObjCreate("SAPI.SpVoice")
global n := 0
*/
DllCall("dwmapi\DwmEnableComposition", "uint", false)
Run, iexplore.exe -k http://diep.io
allow_upgrades := false
colors_changed := false
#Persistent
SetTimer, close_upgrade_popup, 50
SetTimer, exit_when_game_ends, 5000
return
Pause::
allow_upgrades := !allow_upgrades
if (allow_upgrades)
{
SetTimer, close_upgrade_popup, Off
SoundBeep, 3000, 100
}
else
{
SetTimer, close_upgrade_popup, On
SoundBeep, 1500, 100
}
return
Enter::
Send {Enter}
if (colors_changed)
return
colors_changed := true
Send {Home}
Sleep 200
Clipboard = ren_stroke_soft_color false
Send ^v{Enter}
Sleep 200
Clipboard = ren_grid_base_alpha 0.200000
Send ^v{Enter}
Sleep 200
Send {Home}
return
^!+c::
Send {Home}
Sleep 200
if (colors_changed)
Clipboard = ren_stroke_soft_color true
else
Clipboard = ren_stroke_soft_color false
Send ^v{Enter}
Sleep 200
if (colors_changed)
Clipboard = ren_grid_base_alpha 0.100000
else
Clipboard = ren_grid_base_alpha 0.200000
Send ^v{Enter}
Sleep 200
Send {Home}
colors_changed := !colors_changed
return
ClickIfLetterO(x, y)
{
PixelGetColor, c11, x, y
PixelGetColor, c12, x + 1, y
PixelGetColor, c13, x + 2, y
PixelGetColor, c14, x + 3, y
PixelGetColor, c15, x + 4, y
PixelGetColor, c21, x, y + 1
PixelGetColor, c22, x + 1, y + 1
PixelGetColor, c23, x + 2, y + 1
PixelGetColor, c24, x + 3, y + 1
PixelGetColor, c25, x + 4, y + 1
PixelGetColor, c31, x, y + 2
PixelGetColor, c32, x + 1, y + 2
PixelGetColor, c33, x + 2, y + 2
PixelGetColor, c34, x + 3, y + 2
PixelGetColor, c35, x + 4, y + 2
PixelGetColor, c41, x, y + 3
PixelGetColor, c42, x + 1, y + 3
PixelGetColor, c43, x + 2, y + 3
PixelGetColor, c44, x + 3, y + 3
PixelGetColor, c45, x + 4, y + 3
PixelGetColor, c51, x, y + 4
PixelGetColor, c52, x + 1, y + 4
PixelGetColor, c53, x + 2, y + 4
PixelGetColor, c54, x + 3, y + 4
PixelGetColor, c55, x + 4, y + 4
if (c33 < c32 && c33 < c43 && c33 < c34 && c33 < c23
&& c32 < c22 && c32 < c42 && c43 < c42 && c43 < c44
&& c34 < c24 && c34 < c44 && c23 < c22 && c23 < c24
&& c33 < c11 && c33 < c51 && c33 < c55 && c33 < c15
&& c11 < c21 && c11 < c12 && c51 < c41 && c51 < c52
&& c55 < c54 && c55 < c45 && c15 < c14 && c15 < c25
&& c22 < c13 && c22 < c31 && c42 < c31 && c42 < c53
&& c44 < c53 && c44 < c35 && c24 < c35 && c24 < c13)
{
BlockInput, MouseMove
MouseGetPos, x1, y1
MouseClick, Left, x, y, , 0
MouseMove, x1, y1, 0
BlockInput, MouseMoveOff
/*
SoundBeep, 2200, 100
n++
*/
return true
}
else
return false
}
close_upgrade_popup:
ClickIfLetterO(131, 254) || ClickIfLetterO(131, 346)
return
exit_when_game_ends:
IfWinNotExist, ahk_exe iexplore.exe
{
SetTimer, close_upgrade_popup, Delete
SetTimer, , Delete
ExitApp
}
return
/*
`::
v.Speak(n)
n = 0
return
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment