From a84e3110c24714e305581964773b45fdbb6a889b Mon Sep 17 00:00:00 2001 From: Danny Berger Date: Mon, 28 Jan 2013 16:06:44 -0700 Subject: [PATCH] endicia postage --- ...8-scripting-endicia-to-purchase-postage.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 blog/_posts/2013-01-28-scripting-endicia-to-purchase-postage.md diff --git a/blog/_posts/2013-01-28-scripting-endicia-to-purchase-postage.md b/blog/_posts/2013-01-28-scripting-endicia-to-purchase-postage.md new file mode 100644 index 0000000..4004fa2 --- /dev/null +++ b/blog/_posts/2013-01-28-scripting-endicia-to-purchase-postage.md @@ -0,0 +1,39 @@ +--- +title: Scripting Endicia to Purchase Postage +layout: post +tags: applescript endicia loopy +description: Automating user interactions with AppleScript. +code: https://gist.github.com/4660132 +--- + +We currently use [Endicia for Mac][1] 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. + + +### Scripted + +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][2], it can all +be conveniently automated. Using [the script][4] I wrote, $500 can be purchased by running: + +{% highlight console %} +$ osascript endicia-postage-purchase.applescript 500 +ok +{% endhighlight %} + +With that step automated, it can be tied in with the `endiciatool` output -- whenever `` drops below $30, +automatically kick off the script to buy more postage. + + +### Summary + +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][3], you should check them out (and use the promotional code 599888). Their software has been a +valuable timesaver for us. + + + [1]: http://www.dymoendicia.com/segments/all-products/endicia-for-mac + [2]: https://developer.apple.com/library/mac/#documentation/applescript/conceptual/applescriptx/Concepts/as_related_apps.html#//apple_ref/doc/uid/TP40001570-1149074-BAJEIHJA + [3]: http://www.dymoendicia.com/ + [4]: https://gist.github.com/4660132#file-endicia-purchase-postage-applescript \ No newline at end of file