I depend on Outlook reminders sometimes. But if I'm busy they can get hidden behind other windows or minimized, or I might ignore the flashing on the taskbar.
So I've written something that will not let the user hide or minimize the reminder. You must dismiss or snooze etc. Seems to solve my workflow issues.
I'm sure this could be extended to look for certain key words.
Code:
; KeepRemindingMe
;
; Find an Outlook Reminder and don't let the user hide or minimize it.
#SingleInstance
sleepLong = 100000 ; sleep this long when no reminder found
sleepShort = 1000 ; sleep a short amt of time when a reminder is found
sleepTime = %sleepLong%
Loop
{
Sleep %sleepTime%
DetectHiddenText, off
SetTitleMatchMode 2
;OutputDebug, Test %sleepTime%
foundReminder = false
; Do a quick search for a window with 'Reminder'
; Loop over the results
WinGet, id, list, Reminder
Loop, %id%
{
StringTrimRight, this_id, id%a_index%, 0
;OutputDebug, Trying to get ahk_id %this_id%
; The word 'Reminder' isn't really specific enough
; so we need to search deeper.
;
; Do a less optimal search for 'Snooze' and 'Dismiss'
DetectHiddenText, on
SetTitleMatchMode slow
WinGetText text, ahk_id %this_id%
If InStr(text, Snooze) and InStr(text, Dismiss)
{
WinActivate ahk_id %this_id%
foundReminder = true
}
}
if (foundReminder)
{
sleepTime = %sleepShort%
}
else
{
sleepTime = %sleepLong%
}
}
return