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 AppleScript Finder - How to put the path of the current Finder window on the clipboard

Mac OS X FAQ: How can I get access to the full path of the current Finder window? That is, when I'm looking at a Finder window in a directory like /Users/Al/Foo/Bar, how can I easily put that directory path on the clipboard so I can use it in other applications?

As a Mac OS/X newbie I couldn't find a good way to do this, so I wrote an AppleScript (script) to do it for me. Here is the script:

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

Mac Terminal Finder tip: How to open a Mac Terminal window in the current Mac Finder folder.

As a Mac OS X newbie, I don't know if there is a better way to do this, but to open a Mac Terminal window from the current Mac Finder folder, I wrote an AppleScript script. I'm new to AppleScript also, so 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.

 

Syndicate content