Jump to content

Filenaming Script no longer works in FP8


rgreenidge

Recommended Posts

Posted

We have been using the following script below to name our files in the OnJobStart call back rule to automatically name our files with the name of the data file when we compose in FP7. When we try to use it in FP8 it generate a filename with a very long numeric value. Hoping someone has an idea for a fix or a substitute script. Any help is appreciated.

 

Thanks, Richard

 

inputFileExt = ".TXT"

newFileExt = FusionPro.Composition.JobOptions["OutputFormat"];

newFileName = FusionPro.Composition.inputFileName;

 

switch (newFileExt){

 

case "Indigo PPML":

newFileExt = ToLower("." + "PPML");

break;;

 

case "PostScript":

newFileExt = ToLower("." + "ps");

break;;

 

case "Digimaster":

newFileExt = ToLower("." + "ps");

break;;

 

case "Single-File VPS":

newFileExt = ToLower("." + "vps");

break;;

 

case "Multi-File VPS":

newFileExt = ToLower("." + "vps");

break;;

 

default:

newFileExt = ToLower("." + newFileExt);

break;;

 

}

 

for (i = 0; i<=Len(newFileName); i++){

tempChar = Right(newFileName, i);

if(tempChar == ToUpper(inputFileExt)){

newFileName = Left(newFileName, Len(newFileName)-i) + newFileExt;

FusionPro.Composition.outputFileName = newFileName;

return;

}

}

Posted

Will this work for you?

 

ReplaceFileExtension(GetFileName(FusionPro.Composition.inputFileName), FusionPro.Composition.JobOptions["OutputFormat"]);

Posted

Hi Step, thanks for the quick reply. I tried placing the Script in the OnJobStart callback rule and nothing changed. Do I have to place it in another rule?

 

Thanks,

Richard.

Posted

Hi Step, still not working. I tried changing the text where the words "OutputFormat" are with ".pdf" and this did not work either.

 

Thanks,

Richard.

Posted

You should be able to do this in OnJobStart:

FusionPro.Composition.outputFileName = 
   ReplaceFileExtension(GetFileName(FusionPro.Composition.inputFileName), 
       FusionPro.Composition.outputFormatExtension);

However, there's a bug in FusionPro 8 on Mac, where if the file name is longer than 31 characters, it gets munged. We have a fix for this which will be included in the upcoming patch release. If you have an urgent need, you can contact Support about getting a Beta.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...