Win32 GUI Keyboard/Mouse automation with instant failure smtp notifications!
Hot-damn, sometimes I’m so clever with all these Freeware/Opensource solutions.
Having a need for a server to fire up two GUI/Win32 programs and click around/run some menu commands, I set out to find the right automation software that would provide a good amount of error checking feedback — so the headless server doesn’t just go into wonkyville and sit unnoticed for any length of time. The following combo is a pure win:
1) Autohotkey (Free!)
2) Bmail.exe (Free and 17k single cmd line exe!)
3) and finally SMTPServer ($69 single license :( But if you have a open relay smtp server, you don’t need this. I’ll explain soon…)
So I use the powerful scripting of Autohotkey with some checking IF loops to monitor the progress of opening the GUI proggies. When anything goes unexpected (or if the files I’m exporting/converting aren’t found — i.e. something went wrong) then I trigger a quick bmail.exe call which, in a single command line, sends a one liner email to myself with a custom subject/body – letting me know where in the process it went south. (Note: you can also feed a file to bmail for the body, or pipe output right into it. Nice!)
Only unfortunate thing is that bmail.exe doesn’t support authentication to the smtp server, but you can specify the smtp server addr and port. This is where that local SMTPserver (3) comes into play. It allows for relaying smtp out correctly without authentication on the receiving end!
Anyway, the comination of these three tools allows me to not only script out some serious GUI automation (saving a human from the monotomous task of doing this export/import/process every day) but to instantly notify me on my smartphone (G1) whenever something has gone awry.
On a side note, check out the rest of the command line utilities on that Bmail.exe site. He’s written some fantastic, small single .exe utilities that most any admin of a WinXP/2k/2k3 network would die for.
[..] A bit unrelated, but I totally liked this website post [..]