Skip to content

Instantly share code, notes, and snippets.

@cdaven
Last active August 13, 2020 05:09
Show Gist options
  • Save cdaven/360f0509f823d309e1b9de67bd8265b1 to your computer and use it in GitHub Desktop.
Save cdaven/360f0509f823d309e1b9de67bd8265b1 to your computer and use it in GitHub Desktop.
Micro Break Reminder for Windows using AutoHotkey
#Persistent
; Run ShowBreakMessage every 30 minutes
SetTimer, ShowBreakMessage, 1800000
Return
ShowBreakMessage:
if (A_TimeIdlePhysical > 900000)
{
; Idle more than 15 minutes - no reminder
Return
}
if (A_Hour > "16")
{
; After 4pm - no reminder
Return
}
if (A_WDay Not Between 2 And 6)
{
; Weekend - no reminder
Return
}
; Show topmost dialog box for 10 seconds
MsgBox, 4096, Micro break, Look out a window and move around, 10
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment