Posted on 10 March 2008 at 10:51
log “Hello World!”
Scripting for Lawyers is a weblog that will explore all facets of scripting. From learning about the various scripting languages to writing our own scripts to digging into the guts of the operating system, together we will attempt to understand the ways that our computers can make you more efficient, more productive, and more profitable.
As the name of this weblog suggests, I’ll focus on how lawyers, especially those lawyers who use Macs, can use scripts to boss around their applications and data. Although scripts often operate on their own, many scripts can be used in connection with databases, text editors, word processors, calendars, and e-mail applications. As such, we’ll also look at setting up a database and using scripts to push that data into the other applications. We’ll also explore how to access Web services to grab data to put into your application.
#### Why focus on lawyers?
Well, I’m a lawyer and I want to help other lawyers who are interested in scripting. Many lawyers are interested in scripting, but they either don’t have the time to learn scripting or they are intimidated by the geekspeak that they find when exploring this technology. Other lawyers simply don’t understand the power of learning a scripting language and want some examples of how they can incorporate scripting into their workflow.
#### What is scripting, exactly?
Scripting is the process of writing short computer programs that tell your computer to complete a task. In short, you write scripts to boss around your apps. In AppleScript, for example, you “tell” an application process text or save a file or schedule an event. You use scripts to create and enhance your workflows with your current applications. You do not need to code an entirely new application to meet your needs.
#### What do you know about scripting anyway?
I began using Macs in 1998. My first Mac was a green Rev. B iMac. One of my graphic design friends was working on a large [Photoshop](http://www.adobe.com/products/photoshop/index.html “Adobe Photoshop”) file and, while I looked on, dropped the file on to a folder. Suddenly, an application opened, resized and transformed the file, and closed the file. Another application then opened and transmitted the image to a remote database. I stood in amazement. When I asked how they did that, the reply mentioned [AppleScript](http://www.apple.com/applescript/ “Apple’s scripting language”), Apple’s built-in scripting language. Well, I had to try that out. So I went home and started scripting. In 1999, I began working in an all-Mac law firm. The law firm used [FileMaker Pro](http://www.filemaker.com “Apple subsidiary of database software”) to keep track of everything. After learning the workflow and toying with the databases, I began writing AppleScripts to integrate Filemaker Pro with other applications. I have been scripting ever since, only now I’ve learned several more languages and how to use those languages with more databases and applications.
#### So which scripting languages might we see?
The majority of scripts that I plan to show will feature AppleScript. I also plan to introduce you to [Ruby](http://www.ruby-lang.org/en/ “Ruby”), [F-Script](http://www.f-script.org “Smalltalk-like scripting language”), and [JavaScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm “Used on the Web and Adobe Acrobat”). We may also dabble in [Python](http://www.python.org “Python”), [Perl](http://www.perl.org/ “Perl”), and [Smalltalk](http://www.smalltalk.org “Smalltalk”).
#### Wow. That’s quite a bit. What about databases?
I’ve found that most Mac-using lawyers use FileMaker Pro to store information about their cases, which is great because FileMaker has an excellent AppleScript implementation. As such, most of the posts will cover FileMaker Pro. However, I also plan to feature databases such as [OpenBase](http://www.openbase.com) and [SQLite](http://www.sqlite.org).
#### And applications?
Deadlines are very important to lawyers, so learning to script a calendar application will be shown. In this case, we’ll look at iCal. Of course, lawyers write lots of letters, so we’ll look at text editors like TextEdit and word processors like Microsoft Word. We’ll also learn how to script Mail and Safari. Finally, we’ll look at how to script specialty applications like [Bee Docs' Timeline](http://www.beedocs.com “Software for creating timelines”).
#### What if I need help?
That’s what this weblog is for! I want to make this weblog into a conversation where we learn from each other. If you need help that is specific to your situation, [I'm available for consultation](http://scriptingforlawyers.com/?page_id=7 “Find out about my services”).
Now let’s get scripting!