PDA

View Full Version : Point me in the right direction!




lom8104
Feb 11, 2006, 03:48 PM
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
Feb 11, 2006, 04:11 PM
download the tracking widget from apple.com/download

lom8104
Feb 11, 2006, 09:06 PM
Yeah, but that doesn't automate it.

superbovine
Feb 11, 2006, 09:27 PM
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.