Temp file generation works, but I cannot get composition to use it as
inputfile.
var i;
var temp = "/Users/rjmolesa/temp/BizCard-Blank/tempout.txt";
var orginputfilename = "/Users/rjmolesa/temp/BizCard-Blank/Instance.TXT";
var sf = new ExternalDataFileEx(orginputfilename, "\t");
var of = new File(temp);
if (FusionPro.inValidation == false)
{
try
{
if (of.open("create") == false)
{
return "Could not write output file:\n" + temp;
}
}
catch (e)
{
return e + ":\n" + temp;
}
of.close();
// tries to write to the temp file
if (of.open("write") == false)
{
print("Could not write output file.");
}
}
// writes the labels to the temp file
for (i=0;i<sf.fieldCount;i++)
{
if (i>0)
of.write("\t");
of.write(sf.GetFieldValue(0,i));
}
of.write("\r\n");
// writes the data to the temp file
for (i=0;i<sf.fieldCount;i++)
{
startval = 1;
repeatcount = Int(sf.GetFieldValue(i, "Repeat Count"));
for(j=0;j<repeatcount;j++)
{
for(k=0;k<sf.fieldCount;k++)
{
if (sf.GetFieldValue(i,sf.recordCount-1) != "undefined")
{
if (k>0)
of.write("\t");
switch(sf.GetFieldValue(0,k))
{
case "Repeat Count":
of.write("1");
break;
default:
of.write(sf.GetFieldValue(i,k));
}
}
}
of.write("\r\n");
}
}
FusionPro.Composition.inputFileName =
"/Users/rjmolesa/temp/BizCard-Blank/tempout.txt";
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the recipient.
Our privacy policy is posted on www.printplanet.com
--