Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Select specific text box to change text

$
0
0

I have a text box set up using a note value as "NAME". I would like to replace this with whatever the username is for that specific computer.  I tried to use the command, "USERNAME" but it actually places the text "USERNAME" in the text field. I would I pull the actual username from the computer environment?

 

Also, I would like to repeat this code, should I just copy and paste the code below as many times as I want to change information?

 

Hope that makes sense.

 

 

var textFrames = activeDocument.textFrames;       for (var i = 0 ; i < textFrames.length; i++)        if (textFrames[i].note == "NAME") {          var frameName = textFrames[i].contents = "USERNAME";    } 

Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>