Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'resulting': 0.04; 'subject:password': 0.05; 'subject:Python': 0.06; 'subject:file': 0.07; 'subject:How': 0.10; 'python': 0.11; 'csv': 0.16; 'easier.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hyperlink': 0.16; 'steps,': 0.16; 'subject: \n ': 0.16; 'subject:Outlook': 0.16; 'subject:download': 0.16; 'subject:folder': 0.16; 'subject:login': 0.16; 'subject:run': 0.16; 'tweak': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'aug': 0.22; 'separate': 0.22; 'certainly': 0.24; 'subject: .': 0.24; 'url:moin': 0.24; 'fairly': 0.24; 'file.': 0.24; 'login': 0.25; 'sort': 0.25; "i've": 0.25; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'subject:) ': 0.29; 'message-id:@mail.gmail.com': 0.30; 'posting': 0.31; 'url:wiki': 0.31; 'figure': 0.32; 'run': 0.32; 'url:python': 0.33; 'subject:the': 0.34; "i'd": 0.34; 'problem': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'next': 0.36; 'thanks': 0.36; 'possible': 0.36; 'url:org': 0.36; 'two': 0.37; 'step': 0.37; 'being': 0.38; 'solving': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'first': 0.61; 'choose': 0.64; 'between': 0.67; 'receive': 0.70; 'further,': 0.74; 'groups.': 0.74; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cAHuy7AsADhDrMhLUodZBSupB4zIOfLP0eYf0V4gr0M=; b=oaLIeKLI9+I7h3Fb1WuH1pX2jwGCWmMu6G/Qg1LyfYVkuMXv68CP0tFnabq7QV/ZKC ff14r2Fg4JAf1nfC52JTph6f2+FZwrqMtVU2Oj7P8PEpN/RbHzt5sFzpWaqYzbOPx1x1 +i3+v+B9JQuTq1A4zxcBG6Pj2/9O4mir3jpPcRwuNYkFib6Yqy7q6rFP4NQUtCQyxTMw tgHiILxbsq/ai4Nri0hl/vJ/dwC6kSzsD4OCrk6oro1bFD+BynRSpl+qqi2wmxeUpijL kITV37xsqcDcl0+6wwRmwf/B4Bso/MTuoQJM9zBrlQ7KPAtlpjSpnU3DJjlXrMBrOnLF ECdg== MIME-Version: 1.0 X-Received: by 10.220.169.146 with SMTP id z18mr866521vcy.80.1375381975962; Thu, 01 Aug 2013 11:32:55 -0700 (PDT) In-Reply-To: References: <1d7bfd13-52d0-4d2b-8f7f-e117cdec2a5b@googlegroups.com> Date: Thu, 1 Aug 2013 19:32:55 +0100 Subject: Re: How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel macro From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375381978 news.xs4all.nl 15929 [2001:888:2000:d::a6]:54481 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51754 On Thu, Aug 1, 2013 at 7:08 PM, wrote: >> 1) You receive an email >> >> 2) That email has two URLs in it ("secure hyperlinks" means they begin >> >> https:// ?) >> >> 3) You choose one of them as being "appropriate" - is it always the second? >> >> 4) You download the document at that URL, which requires a password >> >> 5) You then run some sort of alteration on the resulting CSV file. >> >> >> >> Please correct me on anything I've misunderstood. >> >> >> >> Python can certainly do all of these steps, with the possible >> >> exception of fetching the email. Dividing the problem up into separate >> >> steps will make the solving of it easier. >> >> >> >> ChrisA > > Thanks a lot ChrisA! You are correct with everything except that the login hyperlink is always the first link and the second one is the link to register. Okay! (Digression: You seem to be using Google Groups. Please read http://wiki.python.org/moin/GoogleGroupsPython before posting further, to avoid antagonizing the list's best responders.) The first step is to figure out how to retrieve the email. You may want to tweak your setup to make this easier. The next thing I'd do would be to port the macro to Python. Everything in between is fairly easy. ChrisA