Tag Archives: Applescript

Part 1: Swift Scripting

via Swift Scripting (Part 1) | Majesty Thoughtware.

When I first heard of the ability to invoke Swift scripts via the Unix hash-bang (#!) convention, what first came to mind was using Swift for the sort of tasks that one might tackle with Bash or Python. It turns out that the language isn’t quite set-up for that pattern of usage, although some have taken steps to fill in the blanks (See SwiftShell.)

Later, I began to explore the use of Swift as a replacement for AppleScript. AppleScript is the user-facing component of the Open Scripting Architecture. It enables end users to orchestrate workflows of varying complexity by sending appropriate commands to one or more applications. I’ve dabbled in AppleScript since it’s debut in 1993, and I’ve often found the language to be a source of frustration. This is partly due to my strong bias towards “normal” programming languages.

iMessage Web Client

via CamHenlin/iMessageWebClient · GitHub.

iMessage Web Client is a web interface for iMessages, enabled by running a small nodejs app (which itself is based on imessageclient) and collection of Apple Scripts on a server signed into your iMessages account with Messages.app. Supersedes iMessageService

Getting Started with JavaScript for Automation on Yosemite

via Getting Started with JavaScript for Automation on Yosemite – MacStories.

Last month I wrote an article for MacStories on the extensibility and automation changes in OS X Yosemite. The second half was a basic overview of JavaScript for Automation (JXA) (the new addition to OS X scripting languages) joining AppleScript. Before writing that section of the article, I wanted to learn the basics of JXA in order to be sure that I understood what I was writing about and wasn’t just blindly summarizing the contents of the JXA release notes and WWDC Session Video.

Since JXA is so new, there obviously was not much information to go by. I’ve never gotten around to learning AppleScript, so articles based on the classic OS X automation language were not much help either, although I’m not sure how much they would apply anyway. The result was quite a few wasted hours trying to figure out some of the most basic parts of JXA, such as proper syntax of method calls, which method calls worked with which apps, and how to identify UI Elements in order to trigger them with UI automation. Eventually I was able to figure these things out, so now I’m back to share what I learned.

AppleScript to install modern.IE VMs with one click in VirtualBox for Mac

Click to Read


  1. Make sure VirtualBox and Growl 2 are installed on your Mac. (Growl is only used to provide progress notifications; the script might work without it.)
  2. Download and extract the ZIP file containing the application. Double click the extracted application. (If GateKeeper does not allow you to open the app, right click the app and select “Open”.)
  3. Choose the VM you want to install and click “OK”.
  4. Wait while the required files are downloaded, extracted, and imported into VirtualBox.
  5. You’re done! VirtualBox will be opened so you can start using the VM.

An Automator/Apple-script to use ‘Lucida Grande’ as system font on OS X Yosemite

A small Apple Automator application which makes it possible to use the traditional Mac OS X system-font “Lucida Grande” on OS X 10.10 Yosemite. Full Read>>

How to use Awesome Font in Swift

How to use Awesome Font in Swift


Font awesome can be a useful part of any project. It comes with a set of common icons and image assets. Since you use text instead of images, you can customize the color and resize without pixellation.

Common use cases include social media icons, button icons, camera and play button overlays, etc.

Integrating font awesome is as simple as integrating any other font.

  1. Create a new project
  2. Download font awesome from http://fortawesome.github.io/Font-Awesome/
  3. Unzip the folder and drag fonts/fontawesome-webfont.ttf into your project
  4. Open Supporting Files/Info.plist
    • Add a new key “Fonts provided by application”. This is of type Array.
    • Expand the array, and for Item 0, set the string value to “fontawesome-webfont.ttf”

Now that you have integrated font awesome into your project, try to create an icon.

Xcode 6: Live Rendering, Visual View Debugging, and Swift

Xcode 6: Live Rendering, Visual View Debugging, and Swift

Xcode is the development environment that Apple supplies to the community for creating Mac and iOS apps. Those familiar with the tool will likely agree that working with previous versions have been nothing short of a love/hate relationship. After any update, Xcode’s quirks and crashes are never far behind, however it is one utility that Mac and iOS developers simply could not live without.

Xcode 6 brings exciting new features and enhancements including support for an entirely new programming language, improved view debugging, live view rendering, extensions, playgrounds, and more.