Adobe CS3 User Manual Page 29

  • Download
  • Add to my manuals
  • Print
  • Page
    / 34
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 28
Adobe Version Cue CS3 Client Programmers Guide 29
Adobe Version Cue CS3 Client Programmers Guide
Scripting Environment
5. Enter the code below into the editor window:
Window.alert("Hello World.");
6. Within the Toolkit, run the script you just created, by selecting Debug > Run or using the
Run icon button on the toolbar (a rightward-pointing triangle).
7. Verify that you can see an alert popped from the context of the Version Cue client.
There is an even terser “Hello World” script we can write, using the dollar ($) object, which is
available as a debugging aid within the ExtendScript implementation of JavaScript and emits
output to the JavaScript console of the ESTK:
$.writeln("Hello World");
Follow these steps:
1. Launch the Version Cue client if it is not already running.
2. Launch the installed ExtendScript Toolkit 2, if you have not already done so.
3. Within the Toolkit, enter the script below directly into the command line of the JavaScript
Console (an edit-box at the top of the Console panel):
$.writeln("Hello World");
4. Press Return (Enter) to have the code execute and display its results to the JavaScript Con-
sole.
5. Verify that you see a message printed out, followed by “Result: undefined.The writeln
function of the dollar class returns “undefined.
Example: List Version Cue Servers
In the next example, we execute code to list the Version Cue Servers known to the CS3 client.
Note that this and also Example 2 you will execute directly against the Bridge main scripting
engine as if the script were installed on the client machine, rather than sent by a Version Cue
Server. This means you will be able to set break-points in them directly from the ExtendScript
Toolkit IDE, which you would not be able to do with a server-driven script— in the latter case,
you need to use $.bp().
NOTE: To make sure that the global objects added by the Version Cue client scripting interface
are available, you have to make sure that the Version Cue client SDK is loaded, if you
want to run this script in a context such as the main Adobe Bridge CS3 scripting
engine. See Enabling the Version Cue Client Scripting Interface from other Scripting
Contexts” on page 28.
NOTE: Note that the shared library exposing the Version Cue client scripting interface is
loaded automatically when you navigate into a sample like Sample CustomProject.
Alternatively, you can call VersionCueSDKLoader.loadSDK() and then once you are
finished running client scripts, you can call VersionCueSDKLoader.unLoadSDK().
Page view 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34

Comments to this Manuals

No comments