/* Lightshow Magic by PVII Copyright 2008 Project Seven Development. All rights reserved. --------------------------------------------------------------- www.projectseven.com --------------------------------------------------------------- PVII Lightshow Fireworks Optimization and Export Directives JSF Version: 1.0 --------------------------------------------------------------- */ var thePath,theFPath,theTPath,theDoc,i=0,mS='',runIt=true,tPrompt=false; var theSourceImage,theFullImage,theThumbImage; var theDestPath=String.fromCharCode(102,105,108,101,58,47,47,47,73,124,47,87,101,98,32,83,105,116,101,115,47,115,111,117,116,104,101,114,110,99,111,108,111,114,97,100,111,104,111,109,101,115,46,99,111,109,47,112,55,108,115,109,95,105,109,103,95,51,49); var theSourceFolder=String.fromCharCode(102,105,108,101,58,47,47,47,67,124,47,68,111,99,117,109,101,110,116,115,32,97,110,100,32,83,101,116,116,105,110,103,115,47,117,115,101,114,47,68,101,115,107,116,111,112,47,76,111,116,32,49,52,54); var fullOpt=({colorMode:"24 bit", exportFormat:"JPEG", jpegQuality:80, jpegSmoothness:0, jpegSubsampling:0, name:"JPEG - Better Quality", numEntriesRequested:256, applyScale:true, percentScale:100, useScale:false, xSize:-400, ySize:-400 }); var thumbOpt=({applyScale:true, colorMode:"24 bit", exportFormat:"JPEG", jpegQuality:80, jpegSmoothness:0, jpegSubsampling:0, name:"JPEG - Better Quality", numEntriesRequested:0, percentScale:100, useScale:false, xSize:-100, ySize:-100}); fw.progressCountTotal=2; fw.progressCountCurrent=0; fw.dismissBatchDialogWhenDone=true; function checkContinueProcess(im){ runIt=fw.yesNoDialog('FW could not open image source file:\n'+im+'\n\nDo you wish to continue processing the remaining images?'); } function checkFileWrite(tP,tY){ var retVal=true; if(tPrompt){ if(Files.exists(tP)){ if(!fw.yesNoDialog('The '+tY+' image file:\n\n'+tP+'\n\nalready exists. Do you wish to replace the file?')){ retVal=false; } } } return retVal; } function P7_processImage(){ fw.batchStatusString=theSourceImage; thePath=theSourceFolder+'/'+theSourceImage; theDoc=fw.openDocument(thePath); if(theDoc&&runIt){ if(theFullImage!='none'){ theFPath=theDestPath+'/fullsize/'+theFullImage; if(checkFileWrite(theFPath,'Full Size')){ fw.exportDocumentAs(theDoc,theFPath,fullOpt); } } theTPath=theDestPath+'/thumbs/'+theThumbImage; if(checkFileWrite(theTPath,'Thumnail')){ fw.exportDocumentAs(theDoc,theTPath,thumbOpt); } fw.closeDocument(theDoc,false); }else{ checkContinueProcess(thePath); } } fw.progressCountCurrent=1; theSourceImage=String.fromCharCode(114,101,97,108,32,101,115,116,97,116,101,32,112,105,99,116,117,114,101,115,32,52,32,49,54,54,46,106,112,103); theFullImage=String.fromCharCode(114,101,97,108,95,101,115,116,97,116,101,95,112,105,99,116,117,114,101,115,95,52,95,49,54,54,95,102,115,46,106,112,103); theThumbImage=String.fromCharCode(114,101,97,108,95,101,115,116,97,116,101,95,112,105,99,116,117,114,101,115,95,52,95,49,54,54,95,116,109,98,46,106,112,103); P7_processImage(); fw.progressCountCurrent=2; theSourceImage=String.fromCharCode(114,101,97,108,32,101,115,116,97,116,101,32,112,105,99,116,117,114,101,115,32,52,32,49,55,48,46,106,112,103); theFullImage=String.fromCharCode(114,101,97,108,95,101,115,116,97,116,101,95,112,105,99,116,117,114,101,115,95,52,95,49,55,48,95,102,115,46,106,112,103); theThumbImage=String.fromCharCode(114,101,97,108,95,101,115,116,97,116,101,95,112,105,99,116,117,114,101,115,95,52,95,49,55,48,95,116,109,98,46,106,112,103); P7_processImage();