kgreer Posted September 3, 2014 Share Posted September 3, 2014 (edited) A few people have expressed some concerns with Outlook's ability to remind them of meetings. the reminder window will be active but minimized and the users would miss appointments. I figured I could use Autoit to solve this problem by making the Outlook reminder window more agressive with reminders. Here is what I came up with, and I would like some feedback or suggestions to make this better or more efficiant. One problem I had was with the title paramater as partial text was not working, however it seems to work with just finidng text from within the window. This will work for Outlook 2013, but Outlook 2010 and 2007 have slightly different text within the window body, "Click Snooze to be reminded again in". I do not run a check on which version of Outlook is installed or if multiple versions are installed. That may be something to add later on. #NoTrayIcon $winTitle = "" $winText = "&Click Snooze to be reminded in:" While 1 If WinExists($winTitle, $winText) Then WinSetState($winTitle, $winText, @SW_SHOW) WinSetState($winTitle, $winText, @SW_RESTORE) WinSetOnTop($winTitle, $winText, 1) WinFlash($winTitle, $winText, 10, 500) EndIf Sleep(20000) WEnd Edited September 3, 2014 by kgreer Link to comment Share on other sites More sharing options...
MikahS Posted September 3, 2014 Share Posted September 3, 2014 Do you have a question for this script? Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 3, 2014 Moderators Share Posted September 3, 2014 ... I would like some feedback or suggestions to make this better or more efficiant.... I believe he stated what he would like. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MikahS Posted September 3, 2014 Share Posted September 3, 2014 (edited) I believe he stated what he would like. I apologize I did not see that statement. #NoTrayIcon $winTitle = "" $winText = "&Click Snooze to be reminded in:" AdlibRegister("showRem", 20000) While 1 ; run indefinitely WEnd Func showRem() If WinExists($winTitle, $winText) Then WinSetState($winTitle, $winText, @SW_SHOW) WinSetState($winTitle, $winText, @SW_RESTORE) WinSetOnTop($winTitle, $winText, 1) WinFlash($winTitle, $winText, 10, 500) EndIf EndFunc This will make it so the script is not paused for 20000 milliseconds during the Sleep() function. Letting you do other things inside your script, while the showRem function is run every 20000 milliseconds. Edited September 3, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
kgreer Posted September 3, 2014 Author Share Posted September 3, 2014 thanks MikahS, I like the use of the AdlibRegister() function. Does omitting the sleep() function cause the script to use more CPU time? Link to comment Share on other sites More sharing options...
MikahS Posted September 4, 2014 Share Posted September 4, 2014 I'm not sure it does anything to the CPU (fairly certain it does not affect it), but using sleep will completely pause the script, making it so you cannot do anything else till it is done. Also, using such a long sleep param as you did, "20000", if you ever implement a GUI with your code you could miss GUI events in your while loop (or onEvent mode) due to waiting so long. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now