This is almost perfect. A few things. When i save the file it keeps placing the information over the otehr rather than rewriting it. Meaning if i save it at 3:00 then save again at 301 it will keep both and just place them over one another. How can i keep only the latest one. A few other things That you will see when i post the Script. app.addEventListener( "beforeSave" , doTextFrameOnPageOne ); function doTextFrameOnPageOne() { var columnOneContentsArray = [ "Document:" , "User Name:", "Computer Name:", "Date Modified:", "Date Output:", "Date Created:", "Output Date:" ]; var columnTwoContentsArray = [ /* "", "", "" */ ]; var myBlendingSettings = { blendMode : BlendMode.OVERLAY }; var myTransparencySettings = { blendingSettings : myBlendingSettings }; var doc = app.activeDocument; var tf = doc.textFrames.add({geometricBounds: ['-.75','-4.45in','.75in','-.75in'] }); var myTable = tf.texts[0].tables.add ( { // Number of Rows and Columns. bodyRowCount : 6 , columnCount : 2 // Use other property/value pairs to define the width of the table, stroke weights, fill color etc.pp. } ); var R1, R2, R3, R4, R5, R6, ip; ip = tf.insertionPoints; myTable.columns[0].contents = columnOneContentsArray; myTable.columns[1].contents = columnTwoContentsArray; var cell0OfColumn2insertionPoint1 = myTable.columns[1].cells[0].insertionPoints[0]; var R1 = cell0OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell0OfColumn2insertionPoint1); R1.associatedTextVariable = doc.textVariables.itemByName("File Name"); //-----------------> CANNOT GET THESE TO RUN R2, R3 <--------------------\\ var cell1OfColumn2insertionPoint1 = myTable.columns[1].cells[1].insertionPoints[0]; var R2 = cell1OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell1OfColumn2insertionPoint1); R2.associatedTextVariable = doc.textVariables.itemByName("userName"); // Cannot find a text variable for User name. var cell0OfColumn2insertionPoint1 = myTable.columns[1].cells[2].insertionPoints[0]; var R3 = cell2OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell2OfColumn2insertionPoint1); R3.associatedTextVariable = doc.textVariables.itemByName("Login User Name"); // Same as User name. //------------------------------------------------------------------------------------\\ var cell3OfColumn2insertionPoint1 = myTable.columns[1].cells[3].insertionPoints[0]; var R4 = cell3OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell3OfColumn2insertionPoint1); R4.associatedTextVariable = doc.textVariables.itemByName("Modification Date"); var cell5OfColumn2insertionPoint1 = myTable.columns[1].cells[4].insertionPoints[0]; var R5 = cell5OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell5OfColumn2insertionPoint1); R5.associatedTextVariable = doc.textVariables.itemByName("Output Date"); // How can i make this show the date string? Like The Modification Date! var cell6OfColumn2insertionPoint1 = myTable.columns[1].cells[5].insertionPoints[0]; var R6 = cell6OfColumn2insertionPoint1.textVariableInstances.add(LocationOptions.AFTER, cell6OfColumn2insertionPoint1); R6.associatedTextVariable = doc.textVariables.itemByName("Creation Date"); } i know userName is not the right one for the variable as well as Login user name but i cannot find the Variable name.. below is how i did it before if i could add the below to the above it would be great. or if there are variables that i cannot see somewhere let me know thanks. var myBlendingSettings = { blendMode : BlendMode.OVERLAY }; var myTransparencySettings = { blendingSettings : myBlendingSettings }; var doc, tf, tvINFO, ip; doc = app.activeDocument; // TEXT FRAME PROPERTIES tf = doc.pages[0].textFrames.add({ fillColor :"Yellow", fillTint: 20, transparencySettings : myTransparencySettings, geometricBounds: ['-.75','-4.45in','1.5in','-.75in'] }); // Text frame information ip = tf.insertionPoints; ip[-1].contents = "Document:"+"\t "+ doc.name +'\r'; ip[-1].contents = "User Name:" +"\t"+ getAppUserName() +'\r'; ip[-1].contents = "Computer Name:" +"\t"+ getLogInUserName()+'\r'; tvINFO = ip[-1].textVariableInstances.add(LocationOptions.AFTER, ip[-1]); "Date Modified:" +'\t'; tvINFO.associatedTextVariable = doc.textVariables.itemByName("Modification Date"); ip[-1].contents = '\r'; tvINFO = ip[-1].textVariableInstances.add(LocationOptions.AFTER, ip[-1]); tvINFO.associatedTextVariable = doc.textVariables.itemByName("Output Date"); ip[-1].contents = '\r'; tvINFO = ip[-1].textVariableInstances.add(LocationOptions.AFTER, ip[-1]); tvINFO.associatedTextVariable = "Date Created:" +'\t'; doc.textVariables.itemByName("Creation Date"); tf.texts[0].convertToTable(); } function getLogInUserName() { // Computer User Name var userNameOSX = $.getenv("USER"); var userNameWindows = $.getenv("USERNAME"); if(userNameWindows == null){return userNameOSX} else{return userNameWindows}; } function getAppUserName() { return app.userName; } Thanks again ..
... View more