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

Hi,
I've got a friend who has free dialup service. The problem is the lines are almost always busy. She would like to schedule her computer to dialup, retrieve her e-mail, and possibly some webpages in the middle of the night when the lines are likely free.

I've found this link: http://www.dit.gov.bt/~takeshi/material/win2000srv/internet-gw/dialup-schedule/ which should handle the dialing and disconnecting. I can use wget or LWP to fetch webpages. The big question is how do I check if Outlook is running, if it isn't running start it and then tell it to fetch her mail? Win32::OLE seems to be the ticket but I can't seem to find any examples related to this or documentation that would seem to help.

Any help on this particular problem would be very much appreciated. If anyone has thoughts on handling this entire process I'd be interested to hear those too.

Thanks In Advance,

--banky

  • Comment on Automating Dialup and fetching of e-mail/webpages with Windows 2000/Outlook

Replies are listed 'Best First'.
Re: Automating Dialup and fetching of e-mail/webpages with Windows 2000/Outlook
by PodMaster (Abbot) on Aug 24, 2002 at 10:08 UTC
    While I may not know how to do this (or want to), I do know how to find out. One is by searching this site like this and another is to google Win32::OLE OUTLOOK. Both methods are covered in How to RTFM, along with other invluable perl resources (I really like and promote this great guide a lot. Heck, with its help there is very little I can't do).

    I came up with many many promising links, like Re: Win32::Daemon and Outlook, Send email (and attachments) with Outlook, Using Perl to look in Outlook public folders.. which, along with the Win32::OLE pod should explain how to use Win32::OLE. Now you should google microsoft.com to figure out how to get Outlook to do what you want it to do through OLE, and translate that into some perl source code.

    Check out http://www.execpc.com/~dg/tutorial/howmapi/howmapi.htm, after which you ought to be able to come up with some perl code to do this.

    If run into any snags, just go ahead and post it here and i'm sure someone will be able to help you. (I dont' have outlook, otherwise I might try to do it)

    ____________________________________________________
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Re: Automating Dialup and fetching of e-mail/webpages with Windows 2000/Outlook
by thor (Priest) on Aug 24, 2002 at 16:16 UTC
    You might not have to pick up the swiss army chainsaw for this one. Some programs check to see if there is already an instance of itself running before it starts. I don't have Outlook handy, otherwise I'd check this myself. If Outlook is such a program, use Windows built in scheduling to "start" Outlook at the specified time. If it's not running, it'll start. If it is, Outlook will say "hey, you didn't really need two instances running" and not launch the second.

    thor