I have obtained an “AutoHotKeys” script that I am wondering can be modified which I am willing to pay for. I do not have time to learn the AutoHotKeys but I would like to pay someone to change this script and add some helpful comments for me to learn it.
This script, pasted below, looks for the “Reminder” window that Outlook Tasks and Calendar events trigger. It then brings it to focus. What is the problem with it? Well, it doesn’t work perfectly. For example, if I have a folder open in Windows with “Reminder” anywhere in the window title, it will also bring that to focus, forcing me to have to close it so the script will stop focusing it.
What I’d like this script to do, would be to only close the Reminders window that are in Outlook. I think it would be best to close the Reminder window based on its Class number, instead of say the process outlook.exe that is running it, because if there’s an e-mail someone has opend with “Reminder” in the subject, I am worried the script will focus on the e-mail, when we really just want to bring Reminders to the forefront of all windows.
The script:
; 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