Created
February 5, 2020 17:12
-
-
Save brimston3/4fac1c73246b14a6bccbfa0944f90e00 to your computer and use it in GitHub Desktop.
Autoit3 script: Set legacy Outlook Calendar Reminders to Always On Top
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cs | |
Copyright (C) February 05, 2020, Andrew Domaszek | |
(MIT License) | |
This script finds the calendar reminders dialog and sets the always on top attribute | |
without stealing focus. It checks every 2 seconds. | |
This fixes the problem where Outlook calendar reminders do not appear over other | |
windows in Windows 10 anymore (it pops under existing windows). | |
Tested with Office 2013, but should work with other versions. Office 365 users can | |
use the always on top setting and do not need this script. | |
#ce | |
$DEBUG_MODE=0 | |
#include <MsgBoxConstants.au3> | |
#include <Process.au3> | |
#include <AutoItConstants.au3> | |
;TraySetIcon ("Shell32.dll", 28) | |
TraySetToolTip ("RaiseOutlookRmdrs" _ | |
& @CRLF & "Periodically force Outlook 2013 reminder window on top." _ | |
& @CRLF & "Version 2020-02-05") | |
While 1 | |
Local $iSuccess = 0, $mbrv | |
Local $sWindowSelector = "[CLASS:#32770; REGEXPTITLE:.*Reminder\(s\)]" | |
Local $hWnd = WinGetHandle($sWindowSelector) | |
Local $iPID = WinGetProcess($hWnd) | |
Local $sProcName = _ProcessGetName ( $iPID ) | |
If 0 = StringCompare($sProcName, "OUTLOOK.EXE") Then | |
$iSuccess = WinSetOnTop($sWindowSelector, "", $WINDOWS_ONTOP) | |
EndIf | |
If 1 = $DEBUG_MODE Then | |
$mbrc = MsgBox($MB_OKCANCEL, "OnTop Result", StringFormat("WinSetOnTop() -> %d, %d, %s", $iSuccess, $hWnd, $sProcName)) | |
If $mbrc = $IDCANCEL Then | |
Exit 0 | |
EndIf | |
EndIf | |
sleep(2000) | |
WEnd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment