This content has been marked as final.
Show 4 replies
-
1. Re: Select specific text box to change text
CarlosCanto Aug 28, 2013 11:15 AM (in response to michael_mandahl)you're not using the USERNAME environment variable, you're using a "USERNAME" string
see here for the proper syntax
-
2. Re: Select specific text box to change text
michael_mandahl Aug 28, 2013 11:25 AM (in response to CarlosCanto)So instead of having
var frameName = textFrames[i].contents = "USERNAME";
I should replace with
alert($.getenv ("USERNAME"));
-
3. Re: Select specific text box to change text
michael_mandahl Aug 28, 2013 11:27 AM (in response to CarlosCanto)Or like this:
textFrames[i].contents=$.getenv("USERNAME")
-
4. Re: Select specific text box to change text
michael_mandahl Aug 28, 2013 11:30 AM (in response to michael_mandahl)Nevermind, I got it.
var textFrames = activeDocument.textFrames;
for (var i = 0 ; i < textFrames.length; i++)
if (textFrames[i].note == "NAME") {
textFrames[i].contents=$.getenv("USER")
}

