See AsUnitForAppleScript.