background preloader

The Ultimate Beginner's Guide To AppleScript

The Ultimate Beginner's Guide To AppleScript
This is the first post in a new series that revisits some of our readers' favorite posts from the past that still contain awesome and relevant information that you might find useful. This post was originally published on July 7, 2009. The best part about AppleScript is that you don't have to be a genius programmer to use it. In fact, you don't have to have any programming experience whatsoever. What is AppleScript? AppleScript is a powerful scripting language that comes built-in to OS X. The Main Window Getting Started: The Tell Block To create an AppleScript, open the application "Script Editor" located inside the AppleScript folder within the Applications folder. [applescript] tell application "Finder" display dialog "Hello World" end tell [/applescript] AppleScript attempts to use plain English wherever possible to make coding extremely simple. Always remember to end your tell blocks correctly or the code will not compile! Color Guide After your code has compiled, click on the "Run" button.

Advanced AppleScript Techniques We've previously offered a basic introduction to AppleScript, and this article will cover a number of useful AppleScript tips and tricks to help you create some amazing advanced scripts. This is part of a series of posts that revisits some of our readers’ favorite tutorials from the past that still contain awesome and relevant information that you might find useful. This post was originally published on September 24th, 2009. First, Do Your Homework This is the third article in my series on automation. In those articles I cover basic functions such as variables that I will not explain here to reduce redundancy. If and If, Else "If" and "if, else" statements are used when you have a certain command or set of commands that you want the script to perform only if the stated requirements are met. For instance, say you want the script to tell you if the value of two variables, x and y, is equal or different. There are only three possibilities: x is greater than y, y is greater than x, or x = y.

Launch Your Favorite Apps in Groups with AppleScript This AppleScript tutorial will show you how to set up groups of apps that can be launched all at once. Along the way we'll learn how to implement lists, handlers, if statements and how to work with the results of a user's actions. What We're Building The basic idea here is that you probably have different groups of apps that you like to have open for different tasks, say for web design or writing. We can accomplish this fairly easily with AppleScript. Set up various app groupsAllow the user to choose from a list of app groupsGrab the result of the user's selectionUse the result to launch a group of apps Launch a group of apps with a single click! From a user's perspective, you'll see a list of different application groups pop up on the screen (work, play, etc.). Step 1. The first thing that we need to do is establish our various app groups. Lists in AppleScript In Applescript, a list is a lot like a variable, only it holds multiple distinct items instead of just one. Our Four Lists Step 2.

Platypus | Sveinbjorn Thordarson Platypus is a developer tool for the Mac OS X operating system. It creates native Mac OS X applications from interpreted scripts such as shell scripts or Perl, Ruby and Python programs. This is done by wrapping the script in an application bundle along with a native executable binary that runs the script. Platypus makes it easy for you to share your scripts and programs with those unfamiliar with the command line interface, without any knowledge of the Mac OS X APIs -- a few clicks and you will have your own Mac OS X graphical program. Creating installers, maintenance applications, login items, launchers, automations and droplets is very easy using Platypus. Features License Platypus is free, open-source software distributed under the terms of the BSD license. If Platypus makes your life easier or helps you be more productive, please donate to support continued development. Download Download Platypus The latest version is Platypus 5.0. DownloadApplication | Source | Old Versions | GitHub

Dictionary of Algorithms and Data Structures This web site is hosted by the Software and Systems Division, Information Technology Laboratory, NIST. Development of this dictionary started in 1998 under the editorship of Paul E. Black. After 20 years, DADS needs to move. This is a dictionary of algorithms, algorithmic techniques, data structures, archetypal problems, and related definitions. Don't use this site to cheat. Currently we do not include algorithms particular to business data processing, communications, operating systems or distributed algorithms, programming languages, AI, graphics, or numerical analysis: it is tough enough covering "general" algorithms and data structures. Some terms with a leading variable, such as n-way, m-dimensional, or p-branching, are under k-. To look up words or phrases, enter them in the box, then click the button. We thank those who contributed definitions as well as many others who offered suggestions and corrections. Here are some references on algorithms and data structures. Bibliography

Related: