List cron entries for all users on Mac OS X

I needed to investigate why a script was being run, and I was pretty sure cron was launching it. The problem was, little useful information was being logged, and no one was sure how it had been set up or what user it was under. Although launchd is now the preferred mechanism on Mac OS for these kinds of things, you’ll still see many systems where cron is being used.

First, you want to become the root user. The following Terminal command is one way to accomplish this:

sudo -s

Continue reading “List cron entries for all users on Mac OS X”

Getting a FileMaker label’s text in a conditional formula

I wanted to do some conditional formatting, such that when a global field had a certain value the label would change its appearance. For example, if my sort column was “address”, then I wanted the column header containing the text “Address” to highlight.

Continue reading “Getting a FileMaker label’s text in a conditional formula”

Using Cocoa’s PDFDocument class from FileMaker

I’ve been looking for a way to interface with some Cocoa classes in the Mac OS X API from FileMaker for a while. My initial target was PDFDocument, part of the PDF Kit suite of classes. For more information on Cocoa’s PDF Kit see here: Introduction to PDF Kit Programming Guide

Continue reading “Using Cocoa’s PDFDocument class from FileMaker”

Recipe for testing JDBC connection to FileMaker Server

FileMaker Server Advanced allows external systems to connect to its hosted database files via ODBC and JDBC. The remote systems can then run SQL commands against the hosted databases. Often the hard part is getting all the infrastructure ready for this. That includes the correct extended permissions on the FileMaker database file, needed drivers, firewall settings, etc.

Continue reading “Recipe for testing JDBC connection to FileMaker Server”

Area Disclosure in FileMaker Using Sub-Summary Parts

The attached file demonstrates a technique for opening/closing areas of a record, allowing a user to hide the information they don’t want to see.

FileMaker File:  DisclosureAreas2.fp7

Continue reading “Area Disclosure in FileMaker Using Sub-Summary Parts”

Port forward for a Cisco ASA using ASDM

I wanted to quickly create a firewall port forward (AKA NAT rule) for the Terminal Services port on a Cisco ASA 5505. Since it had initially been setup using ASDM, it seemed natural to also create the port forward this way.

Continue reading “Port forward for a Cisco ASA using ASDM”

Use Replace Field to total found set

I recently needed to total up some records in a found set in a FileMaker solution, but I wanted to keep all the revisions within the scripts so that I could easily migrate the changes from the development system to production. This solution also already had quite a few “special case” calcs and fields, and I didn’t want to add any more clutter to the schema.

Continue reading “Use Replace Field to total found set”

Removing intermediate directories

We recently needed to remove the intermediate directories in a large number of parent directories. So, if we started with /A/B/C/D, we wanted to end up with /A/B/D. It seemed simple at the time, so I blithely said “Sure, I can write that easily as a shell script”.

Continue reading “Removing intermediate directories”

Using hostname for wiki with OSX Server

We have a wiki server running Mac OS X Server 10.6, and rather than have users type something like this:

http://bbox.beezwax.net/groups/bbox

which would be the standard URL, we instead wanted to use the much simpler:

http://bbox.beezwax.net/

Continue reading “Using hostname for wiki with OSX Server”

Stop FileMaker server from script

If you have a FileMaker system and you need to script the processing of adding or removing files on the server, the first problem you are going to come across is: how do I stop the server from a script?

You may already be familiar with the fmsadmin command. This is present on both Mac OS and Windows installs of FileMaker server. You can simply run the following command in Terminal to stop the server:

fmsadmin stop server

Continue reading “Stop FileMaker server from script”

Setting permissions for FileMaker Server’s Database folder

The Problem

Most FileMaker Server setups on OSX that I have seen are using the default permissions as set by the FilerMaker Server (FMS) installer. When viewed in the Terminal, they look like this:

drwxrwxr-x  11 fmserver  fmsadmin   374 Jul 16 12:54 Databases

Continue reading “Setting permissions for FileMaker Server’s Database folder”

bBox FileMaker plug-in: Easily add AppleScript, Shell, Grep, and more to your FileMaker projects

Today we are making bBox, our toolbox of external functions for FileMaker, freely available to all FileMaker developers. Use it to extend the reach of your FileMaker solutions to resources outside of FileMaker by launching and communicating with other programs, utilizing the powerful commands built-in to Mac OS X, and easily creating, processing, and managing files.

Continue reading “bBox FileMaker plug-in: Easily add AppleScript, Shell, Grep, and more to your FileMaker projects”

Convert FileMaker value lists to AppleScript expression

Passing values between FileMaker and AppleScript can be a pain. Sure, you can use a named field and table in FileMaker to do this, but if you (or someone else) ever changes either of the names your AppleScript routine breaks. So, even though its not the most efficient way to do things, for short routines I often prefer to use FIleMaker’s ability to run a “Calculated AppleScript” (i.e., compile and run a script from a calculated text).

Other than efficiency, one problem with this approach is that you need to convert data into an AppleScript expression. This custom function makes it a simple task to pass a values list from FileMaker to an AppleScript subroutine:

Continue reading “Convert FileMaker value lists to AppleScript expression”

Converting textual dates in FileMaker

If you’re working with data from outside of FileMaker, you’ll commonly have to work with dates that FileMaker’s GetAsDate function won’t understand. To handle this, I created a custom function that allows conversion of a wide variety of date formats.

Some examples of how the function works:

Continue reading “Converting textual dates in FileMaker”

1 2 3 4