LNS Home
Products
Affrus 1.0
Script Debugger 3.0
FaceSpan 4.3
Freeware
XML Tools
XSLT Tools
List & Record Tools
Property List Tools
JavaScript OSA
Sample XML-RPC Server
OSA for Dreamweaver
OSAXen Fixer
CodeWarrior Tools
Site Contents
LNS Home Page
Product Registration
Bug Reporting
AppleScript Sample Scripts
AppleScript/Scripting Links
Events/Public Appearances
Discontinued Products
Contacting Us

OSA for Dreamweaver

Download version 1.0 (28k)

THIS SOFTWARE IS PROVIDED AS-IS, WITHOUT WARRANTY OF ANY KIND. THE AUTHOR DISCLAIMS ANY DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE.

THIS SOFTWARE IS COPYRIGHT © 1998 LATE NIGHT SOFTWARE LTD & MARK ALLDRITT. YOU MAY USE AND/OR DISTRIBUTE THE SOFTWARE WITHOUT RESTRICTION. HOWEVER, IF YOU BUNDLE THE SOFTWARE WITH ANY COMMERCIAL, SHAREWARE OR FREEWARE OFFERING, YOU MUST DISPLAY THIS COPYRIGHT NOTICE ALONG WITH THE LATE NIGHT SOFTWARE URL IN THE SOFTWARE'S DOCUMENTATION AND/OR ABOUT BOX.

What Is This?

This package provides the tools required to integrate AppleScript (or any other OSA scripting system) with Macromedia Dreamweaver. You can use AppleScript as part of any Dreamweaver custom Object, Behavior, Command or Translator.

Requirements

This package requires Dreamweaver 2.0 or later. The demo requires FileMaker Pro version 3.0 or later.

Installation

To install the OSA for Dreamweaver extension along with a Demo, please follow these steps:

  1. Copy the OSA shared library file to the JSExtensions folder in the Configuration folder of the Dreamweaver folder.
  2. Copy the OSATest.as and OSATest.htm files to the Commands folder in the Configuration folder of the Dreamweaver folder.
  3. Restart Dreamweaver if its currently running

Running The Demo

To run the demo, open the Products file using FileMaker Pro (3.0 or later). Next, launch Dreamweaver and select the OSATest command form the Commands menu. A dialog appears listing the products in the Products FileMaker database. Select a product and press insert to insert the product's description into the current HTML document.

Usage

The OSA extension defines an OSA object within the Dreamweaver JavaScript object model. This object has the following functions:

Method Description
OSA.load

This method loads an OSA script. A script must be loaded before in can be executed with the OSA.execute or OSA.executeSubroutine methods.

This routine accepts a single parameter: the name of the script file. Note that the path specified is relative to the Dreamweaver folder. So, simply specifying a file name locates that file in the Dreamweaver folder. Specifying a relative path (i.e. one that begins with a colon, identifies a file within the Dreamweaver folder hierarchy.

Example:

OSA.load(":Configuration:Commands:TextScript.as");

OSA.unload

This method unloads any currently loaded script and disconnects from the OSA scripting environment. Use this method when you are done using OSA scripting.

Example:

OSA.unload();

OSA.execute

This method executes the currently loaded script's Run handler.

Example:

OSA.load(":Configuration:Commands:TextScript.as");
OSA.execute();

OSA.executeSubroutine

This method executes a subroutine handler within the currently loaded script.

The first parameter is the name of the handler. The remaining parameters are passed as parameters to the subroutine handler.

Example:

OSA.load(":Configuration:Commands:TextScript.as");
OSA.executeSubroutine("mySubroutine", "param value 1", "param value 2");

 

The OSADemo.htm file shows these functions in use within the context of simple JavaScript scripts. For full details of the Dreamweaver JavaScript plugin API along with details of how to use JavaScript to add new commands, objects and behaviors to Dreamweaver, please refer to the "Extending Dreamweaver" document contained in the Dreamweaver SDK.

 


Copyright © 1998-2006 Late Night Software Ltd. - All Rights Reserved.