Scripting Endicia to Purchase Postage
January 28, 2013

We currently use Endicia for Mac for postage processing at Loopy. We rarely use the UI since I've scripted most of it, but one annoyance had been to regularly open it up and add postage since it doesn't reload automatically. If we happen to forget, it ends up blocking things until we notice. I finally got around to scripting that, too.


In real life, whenever the balance gets too low it throws up an alert and you need to click through a few menus, select a purchase amount, and confirm the selection before the application will continue. Using System Events, it can all be conveniently automated. Using the script I wrote, $500 can be purchased by running:

$ osascript endicia-postage-purchase.applescript 500

With that step automated, it can be tied in with the endiciatool output – whenever <Balance /> drops below $30, automatically kick off the script to buy more postage.


So now that's one less manual step everybody has to worry about, saving some time and hassle. If you happen to be new to Endicia, you should check them out (and use the promotional code 599888). Their software has been a valuable timesaver for us.