Skip to content

Instantly share code, notes, and snippets.

@shyoo
shyoo / close-app-mem.ahk
Last active December 15, 2015 14:09 — forked from cheeaun/close-app-mem.ahk
I forked and added ask-before-reboot firefox.exe
Loop {
app = firefox.exe
; firefox keep consumes up your memory. sometimes rebooting is good
mem := GetProcessMemoryInfo(app)
Menu, tray, tip, %app% %mem% KB
; if memory is consumed more than 1G ask to user and restart
if mem > 1000000
{
MsgBox, Okay, it's time to restart your firefox. Click OK to reboot firefox.