Skip to content

Instantly share code, notes, and snippets.

@shyoo
shyoo / close-app-mem.ahk
Last active Dec 15, 2015 — forked from cheeaun/close-app-mem.ahk
I forked and added ask-before-reboot firefox.exe
View close-app-mem.ahk
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.