script

AppleScript error: Can't make (handler) into type string

If you ever get the following error message in an AppleScript program (at least while editing the program in the ScriptEditor):

Can't make (handler) into type string

fear not, it seems to be pretty simple to cure. In my case I got this more-specific error message:

Can't make (handler getDayOfWeek) into type string

This error just means that I tried to call a function like this:

How to run JRuby from a Ruby script on a Windows PC

I'm doing some crazy things at the moment, basically calling JRuby from a Ruby script on a Windows 2000 system. I'm doing this because there are a bunch of JRuby scripts that I want to run sequentially, and I also want to check for errors after each run, so what better way to invoke them and look for resulting errors than with Ruby, especially on a Windows system? :)

Mac Finder and Terminal: Open a Mac Terminal window in the current Finder folder

Mac Terminal/Finder tip: This tutorial shows how to open a Mac Terminal window in the current Finder folder by using AppleScript.

For a while I have wanted to be able to open a Mac Terminal window in the same directory as the Mac Finder folder that I’m currently looking at. I couldn’t find any other way to do this, so I finally wrote an AppleScript script to do it. Fortunately the script is pretty simple. Here's the code:

An Ant build script for web applications

Ant web build script FAQ: Can you share an example Ant build script for a web application?

Sure, here's a sample Ant build script for a Java web application. I've included other example Ant scripts for Java Swing/JFC/GUI applications on this website, but this one demonstrates how to use Ant to build a web app instead.

A sample ant build script for a standalone Java application

Ant Java build scripts: Can you share an example of an Ant build script for a standalone Java application?

This is a sample Ant build script for a Java application I wrote. It is a GUI/Swing application named "AlwaysOnTop". I include it here because I'm a big believer in learning by example, and maybe this Ant script can help you create an Ant script for your own applications.

Sat, July 10, 2004 (Creating a sed script to convert HTML to LaTeX)

My obsessive use of LaTeX continues. Here's a link to a sed script I'm creating to convert HTML to LaTeX.

I actually have a reason to do this. During a requirements phase I'm doing a lot of work with HTML prototypes, but the actual specification is being created using LaTeX, and I want to incorporate the HTML prototypes in the LaTeX document. Hence this conversion effort. I know that it can never fully succeed, but I think I'll be pretty happy with 90-95% success here.

 

Perl CGI environment variables example

Here's a sample Perl CGI program I wrote that prints out all of the environment variables it knows. I've found this program to be very useful when first installing a web server, or when debugging a problem with a web server or new environment.

Perl CGI environment variables - example program

Here's the code:

Syndicate content