Illustrator Scripting :: Removing Empty Text Frames
Mar 29, 2013
Trying to remove any text frames with empty content but it doesn't seem to be removing correct textFrame layers?
var numberOfEmptyTextBoxes = 0;
var layersWithNoText = new Array();
if ( app.documents.length > 0 ) {
for ( i = 0; i < app.activeDocument.textFrames.length; i++ ) {
[URL] ....
View 3 Replies
ADVERTISEMENT
Feb 27, 2012
Does this script also cleans up unpainted objects and empty text frames? Personally, I don't think so because the check of the script in extendscript and illustrator results negative.
var idoc = app.activeDocument;var straypoints = []; for (i=0; i<idoc.pathItems.length; i++) {
var ipath = idoc.pathItems[i]; if (ipath.pathPoints.length==1)
straypoints.push(ipath);} for (j=0; j<idoc.textFrames.length; j++) {
var itext = idoc.textFrames[j]; if (itext.textRange.length==0)
straypoints.push(itext);} for (k=0; k<straypoints.length; k++)
straypoints[k].remove();
I also want to automatically remove all objects who have a white fill (white background) and no stroke.
Problem is a created pdf-file of an html-file of a table that must be cleaned up. There are a lot of stray points, empty text frames, unpainted objects, white "cells" that are also be painted in the pdf.
View 1 Replies
View Related
Feb 13, 2014
I am looking for a script that will look through all the layers in my file and if there are no objects on the layer I would like it to delete them.how to remove a layer with a script, just not how to identify a layer or many layers that may no have objects on them.
View 6 Replies
View Related
Mar 23, 2013
I want to evaluate text frames for their x axis and if they are the same shift them slightly because of adobes irritating habit of combining the text frames when it makes a PDF. I have been able to evaluate, but not exactly like I want to but I know it can be done...
var mydoc = app.activeDocument;var mytext = mydoc.textFrames;var allX_Vaues = new Array();for (i =0; i < mytext.length; i++) {var mytextFrames = mydoc.textFrames[i];var theMatrix = mytextFrames.matrix;allX_Vaues.push(theMatrix.mValueTX)var firstEval = allX_Vaues//$.writeln(theMatrix.mValueA+"
"+theMatrix.mValueB+"
"+theMatrix.mV alueC+"
"+theMatrix.mValueD+"
"+theMatrix.mValueTX+"
"+theMatrix.mV alueTY);//alert(allX_Vaues);}//alert(allX_Vaues[1]);for (i =0; i < allX_Vaues.length; i++) {if (allX_Vaues[i] == allX_Vaues[i + 1] ) {alert(allX_Vaues[i] + " and " + allX_Vaues[i +1] + " are the same");}else{alert(allX_Vaues[i] + " and " + allX_Vaues[i +1] + " are different");} }
[code]....
my problem is when I try to move text frames. It flies way of the page. I just want to move the text a slight amount and concatenate is the only way I have been successful. my question is: Is there a better way and why is my text flying so far of the page?
View 11 Replies
View Related
Oct 17, 2012
I am working on a project which needs..Text frames to be converted as flash text >property changed to dynamic text > writing instance name “_txt”.so how can i write scripting on above process.
View 5 Replies
View Related
Mar 3, 2013
I want to select all text frames on all visible layers. The script below will select all text frames even in groups but when a layer with text on it is invisible the script will error.(target layer cannot be modified)
if (app.documents.length > 0 ) {
var doc = app.activeDocument;
var numTextFrames = 0;
for ( i = 0; i < doc.textFrames.length; i++ ) {
textArtRange = doc.textFrames[i];
textArtRange.selected = true;
}
}
So I made this script to select text frames on only the visible layers but it now misses text that is in a group.
var layerCount = activeDocument.layers.length;
var docSelected = activeDocument.selection;
for (i = 0; i < layerCount; i++)
[Code] .....
Why it does not selected textframes in a group when done this way and is there a way to get all textframes selected on all visible layers?
View 3 Replies
View Related
Mar 3, 2013
Okay my script to change text frame color changes the color of all text frames hidden or not.
I need it to only change visible text frames.
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;
newCMYKColor.cyan = 0;
newCMYKColor.magenta = 0;
newCMYKColor.yellow = 0;
[Code]...
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
View 4 Replies
View Related
Oct 10, 2012
I have been using PSP9 for many years now. However, after trying out PSP X5 I liked some of the new features, so I decided to upgrade. Now I'm starting to regret it... For some reason, the new version creates this little "empty space" at the end of text which I cant figure out how to get rid of! I attached a screenshot to show you what I mean. Is there any way to remove this?
View 3 Replies
View Related
Jun 20, 2012
I had to reinstall Acrobat Pro X today because combining pdfs was sticking at "checking security".
After the re-install everything went fine with that, but now ExtendScript shows only itself in the application target menu.
(Previously had all of CS6 and CS5 apps in there)
I tried to reinstall CS6 illustrator to see if that added it, got a few install errors, but mainly about not being able to delete files. No luck in restoring the app menu.
If I set
#target illustrator
I get a "illustrator undefined" error, and no script execution. in the middle of a major project which includes scripts in illustrator and combining pdfs in acrobat.
View 1 Replies
View Related
Jul 11, 2013
Any quick / clever / automated way of selected the container frame you get on imported items (and sometimes other elements) in illustrator (eg. cut and paste from indesign) and deleting it.
This frame can be selected by its points (usually i just swipe a corner point and press delete to get rid of the frame)
View 3 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
May 2, 2013
I am using Photoshop CS6 to prepare images for use in online Help and a print / pdf user guide for the company's newest software / Web app. What do you do to remove blank space from a screen capture? I am specifically curious if you add some type of indicator that tells the user that the actual image will be larger.
The first screen shot (left to right) is a typical screen shot that I've not edited. In the second one, I've cut the bottom button bar and moved it up to reduce the white space in the image. In the third image, I added a quick and dirty little "wave" to tell everyone that I've cut out some of the white space.
View 2 Replies
View Related
Oct 31, 2013
I'm a web developer currently slicing an illustrator file for web graphics. Some of the icons and images have shadows, lights, etc, and it's impossible to simply see by a naked eye which pixels contains some shade or nearly transparent color and which doesn't.
It would be extremely useful if I could somehow easily differentiate between empty and non-empty pixels, so I wouldn't miss any when slicing.
View 2 Replies
View Related
Mar 19, 2013
I have yet another question. I can see the text in a text frame with a script like this,
var doc = app.activeDocument;
var myTextFrames = doc.textFrames[0];
var myTF_Content = myTextFrames.contents; // this will return the string inside the text frame
alert(myTF_Content);
but how do I add some text to the beginning of that text? lets say that this is my textFrame[0] = "this is a simple test string".what is the proper way to add text like the number one and a period to the beginning?
View 3 Replies
View Related
Apr 8, 2013
What is the best way or anyway to remove text from a text frame? Say if you want to remove anything in () in a text frame or any * symbols.
52(one on both sides) //you have this in a text frame
52 // and you want to change it to this by deleting (.)
or
40* //you have this in a text frame
40 // and you want to change it to this by deleting the *
View 25 Replies
View Related
Feb 24, 2012
If I were to select some text, then checkmark 'Overprint Fill' in the 'Attributes' pane, is there a way to tell with JavaScript that the text was set to overprint?
I've been experimenting with this code in ExtendScript, but it keeps returning false:
var doc = app.activeDocument;
$.write(doc.textFrames[0].textPath.fillOverprint + '
');
View 3 Replies
View Related
Jun 30, 2013
script that is able to do the same as this photoshop one [URL] ...., I would use that one in photoshop but its not working in CS6.
find a script that will seperate the text into layers ready for export to After Effects to be used in Kinetic Typography pieces.
View 3 Replies
View Related
Jul 6, 2013
how to place an image into illustrator via scripting with javascript, however I am having difficulties with text files. My code is:
var myDoc = app.activeDocument;
var Layer1 = myDoc.layers[0];
function getTextFile() {
return File.openDialog('Please select the text file to be imported:', undefined, undefined);
}
var myTextfile = getTextFile();
var myPlacedFile = Layer1.placedItems.add();
myPlacedFile.file = myTextfile;
But when I select a text file, it says it is an unsupported format. I'm assuming it has something to do with the extra options that come with importing a text document, specific for .txt and .doc for example.
For what it's worth I was working on an alternate method by read() ing in the contents of the .txt file and setting them equal to the contents of a textFrame, however it imported the text without carriage returns/newlines and I haven't been able to result that issue.
View 3 Replies
View Related
Aug 14, 2012
How i can align vertical center and horizontal center a single line text to a shape (in vbs) ?
View 1 Replies
View Related
Mar 20, 2013
I'm wondering if there is a way for me to only need to create one sample text and get multiple previews of different fonts (either some of my favorites, or just all of them). If not, perhaps there is a way to make a script where the text makes multiple copies of itself and changes the font.
View 1 Replies
View Related
Jan 3, 2013
what is the script to delete some letters from layer?For ex. I've "Layer XYZ" and I want "Layer XY".
View 9 Replies
View Related
Nov 25, 2013
I'm trying to change/access the opacity of a text object (Illustrator CC). In the documents, I found that it's represented by a text frame object, but it doesn't have opacity property. Text range and character attributes don't have it either, so I'm wondering: is there any way of accessing/altering the opacity of a text object using Javascript?
View 5 Replies
View Related
Sep 26, 2013
Have to enter a lot of text snippets into illustrator cs4 every day, would love to make my live easier.
I'm trying to figure out how to import text to illustrator automaticly.
I have olny a few parameters: the text, what font to use, the size of the text (the text width and length in mm as if the text would be converted to outlines, needs to be exactly the right size) and the coulor.
Usually its one line of text, sometimes more lines of wich i have the widht and length of the complete block of text
The parameters could be in a cvs-file or something like that, ideally all texts would be imported in one file but it could be seperate files
Texts should be converted to outlines and saved as AI version 3
Is it possible to do this?
View 1 Replies
View Related
May 13, 2013
Is it possible to use an imported text as a number? I would like to import a .txt tab formatted file containing some values (ex: 22.5; 50.00; 150.00, etc.), and I want to treat those values as numbers in my script. Is this possible?
View 2 Replies
View Related
Mar 30, 2012
i am in need of ai script for arcing text
View 1 Replies
View Related
May 29, 2013
I've looked around for this but haven't found much. I have a server with thousands of print proof sheets, and since the beginning, long before me, the files were saved with verbal descriptive names. It would be a lot better if they were saved according to the PO number. All the proof sheets have a po number listed in pretty much the same place on the sheet... is there a way to copy that PO number from the field within the pdf, and save the file to a new folder using that number as the filename using a script?
View 28 Replies
View Related
Apr 12, 2013
I need a script for Illustrator CS6, that...
1. Opens a dialog where I enter a letter, like "A".
2. Script then check the current layer for text with this letter, and "unview" (opacity = 0 or color=white), all other letters on this layer. So that the layer will only show "A", or "a" and no other type of letter. The script needs to check all text objects, some "a"s will be in objects consisting of several other letters also, like sentances. Script needs to find the letter in these and mute all others.
View 15 Replies
View Related
Oct 17, 2013
I'm looking for a way to import text from a .txt file but I'm totally lost.
View 2 Replies
View Related
Feb 3, 2013
Example of applying text shadow in AI script.
View 3 Replies
View Related
Apr 29, 2011
What would be the best strategy on the usage of data set to translate our product packaging. It's quite complex as we have several languages on the same packaging. Moreover, we have different text sources that would require to be translated in different sets of languages.
I have already looked into the data set and I tried to get familiar with it. How to create the data set and how to name the different variables knowing that there are different source texts for a particular region (region means a set of languages) and other texts for another region... The idea is to export this into one XML file with well identified elements that can be split with a tool, sent for translation according to their region then merged back into one single file to be imported back into illustrator
Region 1:
en-US
text 1
text 2
fr-FR
text 1
text 2
de-DE
etc...
Region 2:
en-US
text 3
text 4
ru-RU
text 3
text 4
Region 3:
etc..
It seems that the formatting such as bold, italic and so on is not exported into the data set which is quite embarrassing.
View 9 Replies
View Related
Sep 6, 2012
I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text. The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.
View 6 Replies
View Related