Markter Posted March 28, 2006 Report Share Posted March 28, 2006 I have a macro the runs all day. I would like to be notified via email when the macro has stopped, ended or aborted. Is there an easy way to do this? Thanks! Mark Quote Link to comment Share on other sites More sharing options...
cyberchief Posted March 28, 2006 Report Share Posted March 28, 2006 When the Macro has ended... just add the Send Email command at the end of your code... just outside of the loop (after "Repeat End"). As far as when the macro stops or aborts... I am not sure... but I can tell you how I do it. My Macros work between certain screens. Each time the macro changes to a new screen... I use a repeat loop looking for the window title... if not seeing it, delay 1 sec, repeat again. Once it gets to 30 seconds, it sends a "Net Send" command to me through the network (screen pop-up message), and then pauses with a "wait for keypress" command. In the below code... the Macro Run: MACRO ERROR is a separate macro that does the net-send function. I use that set of commands quite often in my macro, so I set it up on it's own and just call it in my scripts. Repeat Start (Repeat 30 times) Variable Set String %T70% from Window Title If Variable %T70% contains "Partial" Break Else Delay 1 Seconds End If Repeat End If Variable %T70% does not contain "Partial" Macro Run: MACRO ERROR Text Box Display: Error With Macro Wait for Key Press: ESC End If You can replace my "Macro Run" command with the Send Email command. Quote Link to comment Share on other sites More sharing options...
lemming Posted March 28, 2006 Report Share Posted March 28, 2006 K. Peterson posted a macro called "Heartbeat" which involves the use the Schedule feature. You might be able to modify it for your needs. http://www.macros.com/usermacs/umheartbeat.htm Quote Link to comment Share on other sites More sharing options...
Markter Posted March 28, 2006 Author Report Share Posted March 28, 2006 Thanks for the suggestions. I am not sure any on these suggestions will work for all circumstances. I think what i am going to try is running a macro on another PC that checks the error log for error messages and emails me the errorlog as an attachment. Mark Quote Link to comment Share on other sites More sharing options...
Gabriel Posted September 27, 2006 Report Share Posted September 27, 2006 The easiest way I’ve found to do this is to simply write a macro that sends you an email or text message on your phone, schedule it to run every minute, and then disable it. Next at the beginning of your macro that “runs all day” add a line that will enable the “email alert macro”. Since only one macro can run at a time the “email alert macro” will only run if the first macro fails, or ends. You will need select the “clear error messages” function under preferences>miscellaneous for this to work properly. Also be sure to include a disable “email alert macro” function at the end of your “email alert macro” otherwise you’ll end up with LOTS of emails. Gabriel Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.