Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lom8104

macrumors regular
Original poster
Feb 7, 2005
110
0
So I've ben jonesin' for an exuse to do some scripting or finally use automator when it hit me:

I buy a lot of stuff online, and it would be grand if I could set up mail to put the tracking number e-mails in a special folder called "Tracking "(vis-a-vis mail rules I guess?) then put a bookmark(s) in a "Tracking" folder on my Safari bookmark bar. What would be the best way to go about doing this? All I know is rudementary C++ but I am willing to learn how to script to get this done!

BTW, If its already been done please tell me so I do not reinvent the wheel!
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
you'd have to write an applescript to parse e-mail both plain text and html to extract the tracking numbers. I'd try and find a pre-written library to parse html because I am pretty sure that is a bit far from your ability. After that you script will have to call another program to get your tracking information. I've only used the UPS API before, but they have it for multiple language, well documented, and free. Your'll have to do research on the site for the API. I am sure the other shipping service have the same with probably some problems with USPS. You could use the tracking widget method which basically crawls the webpage for info, and you can look at the source code for that. The API calls are a bit easier because you won't have to adapt your program to the changing of the site.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.