Adobe 38040334 API Reference - Page 41
FWLaunch.mayLaunchFireworks, Arguments, Returns, Example, Availability
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 41 highlights
DREAMWEAVER CS3 36 API Reference Arguments progressTrackerCookie • The progressTrackerCookie argument is the cookie object that the FWLaunch.execJsInFireworks() function returns. Returns A string that contains the result of the script passed to the FWLaunch.execJsInFireworks() function if the operation completes successfully, a null value if Fireworks is still executing the JavaScript, or a nonzero error code 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 "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.