Skip to content

Instantly share code, notes, and snippets.

@milothiesen
Last active August 4, 2016 21:17
Show Gist options
  • Select an option

  • Save milothiesen/554ae347110e69ac776f7fb2609e6b19 to your computer and use it in GitHub Desktop.

Select an option

Save milothiesen/554ae347110e69ac776f7fb2609e6b19 to your computer and use it in GitHub Desktop.
// This script was written by CarlosCanto. I make no claim to this idea or code. I'm posting it here so I have easy access to it for my work -maile thiesen 8/4/2016
#target illustrator
// script.name = makeSelectedTextDynamic.jsx;
// script.description = makes SELECTED text Dynamic, creates Variables;
// script.required = one document with at leas one textFrame;
// script.parent = CarlosCanto // 2/15/13
// script.elegant = false;
var idoc = app.activeDocument;
var sel = idoc.selection;
for (i=0; i<sel.length; i++) {
var itext = sel[i];
if (itext.typename=="TextFrame") {
var idocvar = idoc.variables.add();
idocvar.kind = VariableKind.TEXTUAL;
itext.contentVariable = idocvar;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment