On Fri, Mar 7, 200810:02 AM, the following words from T.L. Miller [EMAIL PROTECTED], emerged from a plethora of SPAM ...
>There are probably better ways of doing this, but I will now be using PM >to check my lotto numbers. > >I have bought 10 tickets, each with 6 numbers and these tickets are good >for 20 drawings. My wife finds it tedious to compare the winning numbers >with our numbers, so I decided to try doing it better. I created a >message listing all the numbers on our tickets and put it a folder in >PM. When there is a new drawing, I will search that folder looking for >the winning numbers. Really quick and easy!!! > > >Tom Miller I use PowerMail to help with my gambling also. ;-) I joined the Colorado Lottery mailing list, so I receive the winning numbers by email. I select the email, then run a script that extracts the data I need and puts it on the clipboard - formatted as I need it to paste into Excel. Sometimes, I get a few days late because I forgot where I put my ticket, so I have the script extract the numbers from several messages at a time. Below is an example of the script I use, nothing fancy because I had pieced this together long ago and since it works, I haven't optimized it. Once in a while, the format of the email I get is changed and I've made quick changes just to make it work with any new changes in the email format. I could probably save the data to a text file, then copy it all later, or muck around learning Excel's AppleScript syntax, but I don't play often enough to get too fancy - only when the jackpot is high. <Begin AppleScript> property lottoeMail : "[EMAIL PROTECTED]" property subIdentifier : "Winning Numbers Notification" property ret : return tell application "PowerMail" set the varMsgList to the current messages set the bigDataString to "" repeat with varMsg in the varMsgList set the varMsgSender to the varMsg's sender set the sName to the varMsgSender's display name set the sAddr to the varMsgSender's email address if the sAddr is the lottoeMail then set the varMsgSub to the subject of the varMsg set the firstWord to the first word of the varMsgSub as text set the secWord to the second word of the varMsgSub as text set the thirdWord to the third word of the varMsgSub as text set the compareString to (firstWord & " " & secWord & " " & thirdWord) if the subIdentifier is the compareString then set the msgContent to the varMsg's content set the drawDate to the sixth paragraph of the msgContent set the fiveNumDrawn to the seventh paragraph of the msgContent set the powerNum to the eighth paragraph of the msgContent set the powerPlay to the ninth paragraph of the msgContent set the infoTabbed to (drawDate & tab & fiveNumDrawn & tab & powerNum & tab & powerPlay) set the bigDataString to the bigDataString & the infoTabbed & ret set the infoTabbed to "" else beep end if end if end repeat if the bigDataString is "" then say "No Data Gathered" else set the clipboard to the bigDataString say "data gathering complete" end if end tell <End AppleScript> -- "Let us be grateful to people who make us happy; they are the charming gardeners who make our souls blossom." -Marcel Proust * Mac Pro 2 GHz Quad Xeon * OS X 10.4.10 * 5 GB RAM *