FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, I'm trying to create a program that will (more or less) send emails. I have everything going pretty good, minus the annoying security error pop-ups. Now I have been able (with the help of google and here) to do work-arounds for this (using Win32::GuiTest).

I'm running the 'error monitor' subroutines with Thread, so that they are running in the background. When the first error pop-up comes, I'm able to select max time, and proceed. When the second error pops up, wait the 5 seconds, and proceed.

So what's the problem? It could be 1 min, or it could be 1 hour before a second email is sent, causing havoc with the first error pop-up. How do I extract the actual text within the error pop-up itself?

I've googled and searched this site for hours on end, and no luck. Best I can come up with for extracting text is:
Win32::GuiTest::GetWindowText($window)
and
Win32::GuiTest::WMGetText($window)
Both however, return the same for me, which is "Microsoft Office Outlook". Any suggestions on how to extract the actual text in the error box, or at least how to tell the difference (in code) between the two? Any help is appreciated.

Replies are listed 'Best First'.
Re: MS Outlook Security Errors
by trwww (Priest) on May 28, 2009 at 20:24 UTC

    Hello,

    I dont have an answer to your specific question, but I can't help but wonder why you don't just connect directly to your smtp server in your script as opposed to automating outlook?

    regards,

      I am behind an extremely secure network. Connecting to anything outside of my local station would be blocked by numerous firewalls. Makes it a little bit of a pain, but that's how you learn I guess.

        If outlook can connect to the smtp server, so can your script.