Fwlaunch.maylaunchfireworks() – Adobe Dreamweaver API Reference CS5 User Manual
Page 40
35
DREAMWEAVER API REFERENCE
Fireworks integration
Last updated 8/27/2013
•
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
"prompt('Please enter your name:')"
to
FWLaunch.execJsInFireworks()
and checks for the result:
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.
Description
This function determines whether it is possible to open a Fireworks optimization session.
Arguments
None.
Returns
A Boolean value that indicates whether the platform is Windows or Macintosh; if it is Macintosh, the value indicates
if another Fireworks optimization session is already running.