Article View: adobe.scripting.indesign
Article #10239Re: [JS CS2] Open a text file and parse line by line
From: chad_edge
Date: Wed, 28 Jun 2006 20:09
Date: Wed, 28 Jun 2006 20:09
26 lines
1415 bytes
1415 bytes
Update: I've adjusted my code to the following:
var openPilFile = File(pilFile);
var pilFileCreated = openPilFile.created;
var pilFileLength = openPilFile.length;
var pilFileContents = openPilFile.open("r");
var openPilFileContents = pilFileContents.read;
var alertText = "Your .pil file has been opened.";
alertText = alertText+"\n Length: "+pilFileLength;
alertText = alertText+"\n Created: "+pilFileCreated;
alertText = alertText+"\n Open: "+pilFileContents;
alertText = alertText+"\n Contents: "+openPilFileContents;
alert(alertText);
This returns:
Script Alert
Your .pil file has been opened
Length: 1343
Created: Wed Jun 28 2006 12:54:08 GMT-0700
Open: true
Contents: undefined
[OK]
Notice that "Contents: undefined" still doesn't work.
Any takers?
Technical Details
Message-ID:
<3bc0c041.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.motzarella.org!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc0c041.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,3bc9981b28d99c9 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: chad_edge@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: [JS CS2] Open a text file and parse line by line Message-ID: <3bc0c041.0@webcrossing.la2eafNXanI> Date: Wed, 28 Jun 2006 13:09:04 -0700 References: <3bc0c041.-1@webcrossing.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.motzarella.org!news.ecp.fr!news.stben.net!webcrossing