Adobe 38040334 - Dreamweaver CS3 User Manual page 41

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Arguments
progressTrackerCookie
• The
progressTrackerCookie
function returns.
Returns
A string that contains the result of the script passed to the
operation completes successfully, a
that indicates one of the following errors occurred:
• Invalid usage, which indicates that a JavaScript error occurred while Fireworks executed the script.
• File I/O error, which indicates that Fireworks cannot create a Response file because the disk is full.
• Error notifying Dreamweaver that the user is not running a valid version of Dreamweaver (version 3 or later).
• Error starting Fireworks process, which indicates that the function does not open a valid version of Fireworks
(version 3 or later).
• User cancelled the operation.
Example
The following code passes the string
and checks for the result:
works()
var progressCookie = FWLaunch.execJsInFireworks("prompt('Please enter your name:')");
var doneFlag = false;
while (!doneFlag){
// check for completion every 1/2 second
setTimeout('checkForCompletion()',500);
}
function checkForCompletion(){
if (progressCookie != null) {
var response = FWLaunch.getJsResponse(progressCookie);
if (response != null) {
if (typeof(response) == "number") {
// error or user-cancel, time to close the window
// and let the user know we got an error
window.close();
alert("An error occurred.");
}else{
// got a valid response!
alert("Nice to meet you, " + response);
window.close();
}
doneFlag = true;
}
}
}
FWLaunch.mayLaunchFireworks()
Availability
Dreamweaver 2, Fireworks 2.
argument is the cookie object that the
FWLaunch.execJsInFireworks()
value if Fireworks is still executing the JavaScript, or a nonzero error code
null
"prompt('Please enter your name:')"
FWLaunch.execJsInFireworks()
function if the
to
FWLaunch.execJsInFire-
DREAMWEAVER CS3
36
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents