Copy link to clipboard
Copied
var contentsOfFrame =
doc.name+"\r"+
getLogInUserName() +"\r"+
getLocaleDateString() +"\r"+
getDateModification() +"\r"+ // Whats the Coder for Date Modified?
getOutputDate()+"\r"+ // Whats the code for Output date?
getAppUserName();
I cannot find anywhere what the Modification Date and Output date should be. Can you please help.
Copy link to clipboard
Copied
Try this website:
http://www.indesignjs.de/extendscriptAPI/indesign11/#VariableTypes.html
Copy link to clipboard
Copied
Thank you I'll try it Monday and let you know
Copy link to clipboard
Copied
Ok it works. Kinda. It places abunch of numbers in the Date Modified and Output area but i need it to convert those #'s into the acutal Time and date. Just like the Save Date Shown below the File Name. the First number just under the Date is Date modified, and the one below that should be Output date.
Here's how its coded.
var contentsOfFrame =
doc.name+"\r"+
/* getLogInUserName() +"\r"+ */
getLocaleDateString() +"\r"+
VariableTypes.MODIFICATION_DATE_TYPE +"\r"+ // Whats the Coder for Date Modified?
VariableTypes.OUTPUT_DATE_TYPE +"\r"+ // Whats the code for Output date?*/
getAppUserName();
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I already tried that script. It adds some of the stuff i want but i want it to be automatic in every file we have done. SO I've used another script and added the above script to my Startup Scripts folder so No matter who opens the File and saves it all this information is in there. Without us having to make a separate text box and add our Text variables.
Copy link to clipboard
Copied
I meant to put the other part of code not the one above.
var contentsOfFrame =
doc.name+"\r"+
getLogInUserName() +"\r"+
getLocaleDateString() +"\r"+
VariableTypes.MODIFICATION_DATE_TYPE +"\r"+ // Why doesn't this work? ANd how do i get it to work?
VariableTypes.OUTPUT_DATE_TYPE +"\r"+ // Why doesn't this work? ANd how do i get it to work?
getAppUserName();
I meant to ask these question on the second time i posted this code. If you need the rest of the code to see let me know and i'll paste it all on here.
Copy link to clipboard
Copied
Why this is not working:
You apply an enumerator instance as part of the contents of the text frame. And that is producing a string from a number.
Since JavaScript is weakly typed the number will be automatically converted to a string.
And finally this string is part of the contents of a text frame.
Yo can read about "weakly typed" , enumerations and enumerators here:
An Enumerator is a special native object which converts itself into either a String or a Number depending on the context.
Indiscripts :: InDesign Scripting Forum Roundup #3
How do Enumerator Instances Mimick Numbers
Indiscripts :: InDesign Scripting Forum Roundup #8
Regards,
Uwe
Copy link to clipboard
Copied
Here's another couple of links, both links are relevant so don't get put off by the titles
Re: How do I get ID ME (Middle Eastern) to display strings right-to-left?
and
Re: How can I create a running header?
HTH
Trevor
Copy link to clipboard
Copied
I've tried about 10 different strings and Variables infront of The MOD date and OUTput date and it still shows up those numbers above Any other ideas?
Copy link to clipboard
Copied
Ok so whats going on is that the Actual Value is working and being placed in the Text frame. I just need to now tell the script what the value should be translated to? Because when i get this to show those numbers they are the actual value's shown for that command. however i'm not telling the script how to translate it. is my thinking correct?
Copy link to clipboard
Copied
The fact of the matter you have to remember 2 points.
Uwe's links explain why.
Got it working?
Copy link to clipboard
Copied
I'm messing with it now. I'm trying to figure where to place those lines.
Copy link to clipboard
Copied
Not sure what i did wrong. A few min's ago i had it where it added the variable to my Type>Text Variables menu. That's not where i'm wanting it. did i place the code in the wrong place.
Copy link to clipboard
Copied
I'm gonna start another thread about this because The Original question was actually answered.
Copy link to clipboard
Copied
No i cannot figure this out. I've tried everything. Is there another command without using text variables that will show output date and Date created? This script has me whooped. I just need 2 things and i think it will be done.
Copy link to clipboard
Copied
Here's what i have and i'm stuck
Part one.
var contentsOfFrame =
doc.name+"\r"+ //Working
getLogInUserName() +"\r"+ //Working
getLocaleDateString() +"\r"+ //Working
//-------------------->This is the Part that i cannot get to work proper<---------------------\\
// this Will display the Current date but I still not get it to display the Date Created or Output. Any help PLEASE will be awesome.
getCreationDateString() +"\r"+ // NOT WORKING
/* getOutPutDateString()+"\r"+ NOT CREATED YET*/
//--------------------> The "VariableTypes" <---------------------\\
function getCreationDateString() {
var myVar;
myVar = doc.textVariables.add();
myVar.VariableType=VariableTypes.CREATION_DATE_TYPE;
var Save_Information = Save_InformationTextFrame;
Save_InformaionTextVar.associatedTextVariable= myVar;
/*return Date(' Created ').toString();*/
}
Copy link to clipboard
Copied
I created a new post as stated above for the second part of my question. here Cannot get the Date modified and Output to work correctly
Find more inspiration, events, and resources on the new Adobe Community
Explore Now