You are currently browsing the archives for the Screencast category.

Posted on 7 July 2008 at 14:06

Permalink to the post entryHelp Request: Table of Authorities

Dear readers, I’m writing a script that generates a Table of Authorities from a Pages document and I need your help. I’ve determined 2 ways to delimit a citation for inclusion in the Table and I’m interested in your thoughts on how to implement this all-important feature.

First, the user could highlight the citation, then select the type of citation (case or statute) from a dialog box. Microsoft Word for Windows uses this method. I don’t particularly like this method, but it’s familiar to many switchers.

The second way is to delimit the citations using a markup language. For example, one might use something like \case{A v. B., 123 U.S. 456 (2008)} within their text to delimit the case citation. With my background in LaTeX and HTML, I prefer this method as it’s easier to parse the document. Moreover, the user would not have to go back and highlight each citation, hoping not to miss a citation. Instead, the user would simply delimit the cases as he or she types.

Here’s a quick movie of what I have so far. I’d love to get your feedback on how you might delimit the citations. Thanks!

Posted on 3 June 2008 at 20:00

Permalink to the post entryFun with…Rocket Matter?

Rocket Matter is a Web-based case management system for lawyers and law firms. When I first heard about Rocket Matter, I immediately inquired about an API (Application Programming Interface) for accessing one’s data via AppleScript (or any other programming language). I told the developers at Rocket Matter that I wanted to access my data from Rocket Matter’s secure databases and push that data to various applications on my Mac. The developers graciously granted my request and we’ve been working on an API to allow such access. Although the API is still experimental, I was able to produce this video to show you that Web applications need not be a burden to your scripting. Enjoy.

UPDATE: You may need to turn up your volume. I need to get a microphone for these screencasts.

Scripting Rocket Matter

Posted on 12 March 2008 at 6:32

Permalink to the post entryScreencast and First Script

Before we get to our first script, I thought that I’d post a quick screencast of a script in action. This screencast shows some of the power of scripting. In the screencast, I grab some data from a text file, parse that data, then send the data to Timeline to create a beautiful timeline.

Click here to view the screencast

As you can see, I’ve used this script to create a timeline of events in a litigation context. In this case, I used a simple text file as my data source, but you could also use a database like FileMaker Pro or a spreadsheet like Microsoft Excel to hold your data. (Not that there’s anything wrong with plain text, mind you.) More importantly, however, I saved valuable time by not having to enter the data twice–once into my data source and again into Timeline. And I can use the script over and over again, saving more time every time I use the script. I timed the script execution to around 2 seconds. I then manually entered the events to create the timeline and finished in 240 seconds. Every time I use this script, then, I save almost four minutes of my time. This is the power of scripting.

On to our first script!

Open Script Editor and type the following text into the editor pane:

say "Hello from AppleScript!"

Hello from AppleScript

Now click the “Run” button or press Command+R. You should have seen the text change color and then you should have heard your computer speak the words, “Hello from AppleScript”. Cool!

So what happened? When you clicked the “Run” button, Script Editor secretly compiled the program first. When Script Editor compiles a program, it checks for errors in your code, then converts your code to machine code for the computer to read. Here, the translated code sent a command—the “say” command—to the computer along with an argument for the command—the text string “Hello from AppleScript—and the computer obeyed your command and said the words, “Hello from AppleScript”. The key lesson to remember is that, in AppleScript, you “tell” your applications to do things using “commands”. Who’s the boss, now?

How do you know what commands you can send to an application? For that you need to know about AppleScript dictionaries, the subject of the next post.