MacTech Article > AppleScripting System Preferences

Whether you manage one Mac or many, applying system preferences and settings can be a real pain in the neck, especially if you regularly have to re-apply the same settings.  Maybe you're an admin who manages an entire network of Macs and you need to make a sweeping change across all of your machines. Or, maybe you just want your Dock on the left when you're at work and at the bottom when you're at home.  Regardless of the situation, if you need to make regular changes to settings on your Mac, AppleScript can probably help you streamline the process.  In this month's column, we'll take a look at some simple ways you can use AppleScript to gather system information and tweak settings.

[Read the full article in MacTech magazine's January 2013 issue, available in print and in the MacTech iPad Newsstand app]

TUAW Post > AppleScripting OmniFocus > Send Completed Task Report to Evernote

ofocus_scriptI've mentioned before thatOmniFocus is my task manager of choice. Each morning, I pull up a list of scheduled tasks for the day, and focus on getting them done. In OmniFocus, I've set up Perspectives (saved window states) for both Due tasks and Completed tasks. What I really want, however, is something that will pull out recently completed tasks and summarize them in Evernote, my note management app of choice. This way, I can maintain a historical log of my progress, and pull out summaries of completed tasks to send to clients. Since this type of integration isn't built into OmniFocus or Evernote, I wrote an AppleScript to do it.

[Read more on TUAW...]

TUAW Post > AppleScripting Dates > Elapsed Time Calculator

script_heartSince Valentine's Day is this week, I thought I would take this opportunity to share an AppleScript I wrote to calculate how long my wife and I have been married. With this baby, I'll never be accused of forgetting how long it's been when our anniversary rolls around. The script determines the elapsed time between now (the current date and time), and a prior date and time (such as our anniversary). It then displays the result in seconds, minutes, hours, days, weeks, months, and years.

[Read more on TUAW...]

TUAW Post > AppleScripting Notification Center > Scheduling Do Not Disturb

nc_scriptMountain Lion's Notification Center is great for keeping you in the loop, but it can be a huge distraction when you need to get stuff done. Sometimes, a little peace and quiet is all you need to stay productive.

As you may know, iOS 6 includes a handy Do Not Disturb feature, which can be turned on to disable notifications. It can even be set to automatically enable/disable itself at scheduled intervals. Mountain Lion also lets you disable Notification Center. Just open Notification Center and drag down to access a Show Alerts and Banners toggle switch. Note that this is a temporary setting, and disabled notifications automatically re-enable at midnight.

Unlike iOS 6, though, Mountain Lion doesn't give you an option for enabling/disabling notifications on a schedule. At least, it doesn't provide a built-in option for this. With a little customized help from AppleScript, Automator, and the Calendar app, it is possible.

In this post, you'll create two Calendar Alarm Automator workflows, which can be configured to run at scheduled times to enable or disable Notification Center alerts and banners.

[Read more on TUAW...]

Peachpit Article > Building a Simple Image Processor with AppleScriptObjC (Cocoa-AppleScript)

My earlier article "Building a Basic AppleScriptObjC (Cocoa-AppleScript) Application with Xcode" explained how AppleScriptObjC and Xcode can be used to build robust interface-based applications for the Mac. While that article demonstrated this principle through the creation of a very simple Hello World application, the techniques provided can serve as the basis for building more advanced applications, for real-world scenarios. In this article, we'll build on those techniques to create a functional application that can perform some basic image manipulations, including flipping, rotating, and scaling a chosen image.

[Read more on the Peachpit.com...]

TUAW Post > AppleScripting Evernote > Embedded Image Scaler

I'm a big fan of Evernote. I use it for archiving ideas, writing articles and blog posts, and lots more. I often insert screenshots and other large images into my notes. Screenshots can be pretty big, and I usually don't want giant images filling up my notes. I keep wishing Evernote offered a way to resize embedded images, so I could insert thumbnails. At the moment, it doesn't. So, I decided to write my own app to resize embedded images. Here's how you can do the same...

[Read more on TUAW...]

TUAW Post > Ten TextExpander Date Snippets

TextExpanderTextExpander (Smile Software) is a utility I use each and every day on my Mac to save time and increase productivity. One of the things I use it for is formatting and inserting dates and times. Adding the date or time to a file or folder name, into an email, a document, and so on. In this post, I've shared some of my most used date and time snippets. I hope you find them as useful as I do.

[Read more on TUAW...]

TUAW Post > AppleScripting OmniFocus > Send Due Tasks to iTunes

ofocus_scriptOmniFocus is a great tool for keeping us organized. But, let's face it. We're busy people. That's why we need a task management app in the first place. How can you take your productivity to the next level? How about having your daily OmniFocus tasks read to you as you drive to work? With a little help from AppleScript and Automator, you can make that happen.

[Read more on TUAW...]

TUAW Post > AppleScripting OmniFocus > Swap Task Names and Notes

ofocus_scriptI use OmniFocus on a daily basis to keep track of important tasks. On a few occasions, I've entered tasks and assigned notes to them, only to decide later that I'd rather use the note as the task name, and the task name as the note. Rather than manually cycling through my tasks and swapping the notes, I wrote an AppleScript to do it. Now, anytime I want to perform this task, I can simply run the script. Here's how I did it...

[Read more on TUAW...]

TUAW Post > Preparing High-Res Icon Files with Automator

automatorThis week's post is for all those Mac app developers out there. If you're not an app developer yet, it's a New Year, and I'm sure becoming an app developer is at at the top of your resolution list. In any case, if you plan to develop apps, then you need to prepare icons for those apps.

[Read more on TUAW...]