Hello. I'm looking for a little help customizing the script below.
I would like the script to:
- Not include the file extension of the linked file in the file name
- Position the placed text relative to the top left hand corner of the linked file (not relative to the AI artboard)
- My linked file names have spaces in them. I would like the placed text to replace the "%20" with an actual space
//var Sel_itemPlaced = app.activeDocument.placedItems[0]; // if nothing is selected - use the first linked file item var sel_itemPlaced = app.activeDocument.selection[0]; // be sure that a linked item (and not an embedded) is selected //alert (sel_itemPlaced.file.name); var aTF = app.activeDocument.textFrames.add(); aTF.position = [50,-50]; aTF.contents = sel_itemPlaced.file.name;
Many thanks so far to pixxxel schubser who has helped me get this far. This request spawned from Linked files name.