A SERVICE OF

logo

Adobe Version Cue CS3 Client Programmer’s Guide
Scripting Environment
28
To exercise Version Cue features, use Adobe Bridge CS3 or other Version Cue clients such as
Adobe Photoshop CS3 and Adobe InDesign CS3.
Enabling the Version Cue Client Scripting Interface from other Scripting Contexts
There is one contract that you need to be aware of before using the client scripting interface to
Version Cue from a context such as a JavaScript running against the Adobe Bridge CS3 script-
ing engine. If you want to access the client scripting, you must explicitly load (and unload) the
shared library that contains the scripting wrapper layer. Note that when you navigate into a
custom project— for instance, “Sample Custom Project”, supported by the plug-in named
sample.customproject— this loading and unloading of the shared library containing the client
scripting interface is done for you.
VersionCueSDKLoader.jsx is a startup script that point products in Creative Suite (such as
InDesign, Bridge, Illustrator) load on startup. This file VersionCueSDKLoader.jsx contains
two methods, loadVCSDK and unLoadVCSDK, which you can use can use to load and unload
the VersionCue client SDK shared libraries (versioncuesdk.dll/framework) from your own
Javascript code using the ExternalObject mechanism. After loading these shared libraries, you
can use the Version Cue client scripting interface from your own JavaScript code. The reason
you may be doing this is because you want to write some code that runs within the Bridge
scripting engine, but still makes use of the Version Cue client scripting interface.
For instance, if you wanted to use the classes in the Version Cue client scripting interface from
Adobe Bridge CS3, you can load and use the Version Cue classes with something like this frag-
ment of JavaScript:
if(VersioncueSDKLoader.loadVCSDK() != null)
{
// Use Versioncue scripting interface classes here
...
VersionCueSDKLoader.unLoadVCSDK();
}
else
{
alert ( “Unable to load versioncueSDK”);
}
Example: Hello World
One of the most elementary scripts you might write is to display an alert with “Hello World”:
Window.alert("Hello World.");
To run this script within the Version Cue client scripting engine, follow these steps:
1. Launch a Version Cue client application.
2. Launch the installed ExtendScript Toolkit 2.0 if you have not already done so.
3. Set the target application in the Toolkit to be “Adobe Bridge.”
4. Within the Toolkit, select File > New JavaScript to get an empty editor window.