AutoHotkey Community

It is currently May 25th, 2012, 3:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: September 11th, 2007, 4:59 pm 
Offline

Joined: July 20th, 2007, 5:49 am
Posts: 27
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Script Modification
PostPosted: September 2nd, 2009, 6:06 am 
Offline

Joined: September 1st, 2009, 8:36 pm
Posts: 1
Is there something you can add that only focuses the window if the window is the right class for a reminder window? in order to make sure the script doesn't accidentally focus another window with "Reminder" in the title?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 11:52 pm 
Offline

Joined: February 14th, 2008, 10:07 pm
Posts: 72
Location: Santa Clara, CA
Thanks Harryman,

This happened to just yesterday: outlook reminder popped up, 15 minutes before the meeting - I ignored it ... 30 minutes later ... I get a call from my boss "where are you"

I will definetly put your script to good use :)

aobrien


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, Exabot [Bot], JamixZol and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group