Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberSure. The getFiles command returns all files in a folder, possibly filtered by a mask. Do your Thing inside the loop; the rest ought to go all by itself.
You might want to try your processing first on only a few files, before letting it rip into several thousands.
Note that the final line ensures the file always gets overwritten. If you don't always want to do that, set a flag if it's to be saved, and use SaveOptions.NO when not. And, of course, you can create a new file and write to that instead.
myList = Folder(Folder.myDocuments.fsName+”/someSubFolder”).getFiles(“*.indd”);
alert (myList.join(“; “));for (list=0; list<myList.length; list++)
{
// Skip folders that accidentally can creep in
if (myList[list] instanceof Folder)
continue;
// Make sure dialogs are not interfering
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
try {
currDoc = app.open (myList[list]);
} catch (e)
{
// This happens on files for newer versions. Skip.
alert ('Could not open “'+myList[list]+'”..?');
continue;
}
// .. we want to see the 'real' errors
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
// .. do something
alert (currDoc.pages.length);
currDoc.close(SaveOptions.NO); // SaveOptions.YES);
}November 2, 2010 at 4:46 pm in reply to: Any Way to Synchronize a Book to Turn On/Off Layers? #57557Theunis De Jong
MemberYou mean, you'd want add all of the layers in each document added to all other documents?
November 2, 2010 at 4:00 pm in reply to: Any Way to Synchronize a Book to Turn On/Off Layers? #57555Theunis De Jong
MemberCaryn, wouldn't that lead to lots of documents with no layers selected at all?
Theunis De Jong
MemberAs a matter of fact you can do it with a single command, which is very useful because it's also one single Undo! (You don't have to feel bad about seeing this command for the first time — it dwells into the “advanced” realm of scripting.)
app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().properties = {autoGrow:true, minimumHeight:”1p”};
There!
(You might want to note that this does not change the actual row height. I tested it on some manually enlarged rows, and it happily sets the minimum height but doesn't change the actual height when it's larger than that.)
Theunis De Jong
Member“Style-sheet”? It's called “autoGrow” in the JS Help.
Use like this:
app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().autoGrow = false; // or 'true', whatever you need.
This one-line script will set all table rows to 'exact' height. That height, in turn, can be set with a similar line:
app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().minimumHeight = “5mm”;
I should note I'm typing off top/head — these lines are Not Tested.
Theunis De Jong
MemberYou need one master page per tab. (The only alternative is drawing each of them on each page…)
The very best way to set this up is:
1. Create a Master Master spread. Put all of your tabs on this one, so you can align them and globally change whatever you want.
2. For each new chapter, create a separate Master spread and base it on the Master Master spread.
3. Cmd+Shift+Click on each of the unwanted tabs to delete them, per new chapter master. Leave the one you need alone.
Now, when you update your Master Master, all of the other masters will automatically update as well.
October 31, 2010 at 2:50 pm in reply to: how to keep the same resolution of the document while exporting into pdf #57539Theunis De Jong
MemberNo.
“100%” is 100% — according to the application you view it in. InDesign doesn't 'know' the size of your screen — or rather, the size of its window on that same screen. I think it just assumes 72 pixels per inch — it may also be 96, or something entirely else.
Similarly, a PDF doesn't have a “pixel size” either. Per PDF specification, all measurements in a PDF are in points. Some PDF viewers may allow the user to set their own dpi value for their own screen (if I remember correctly, recent Acrobats have that), but not every user will have done that.
PDF is just not designed to be “viewable at 100%” — on a screen; it's purely designed for output.
Theunis De Jong
Memberso if I use a invisible character like a hard or soft return it will serve as an “end character”?
Yep — and Adobe even thoughtfully included one, specifically for this case. It's called “End Nested Style”.
Theunis De Jong
MemberThanks for calling our attention to this, DLawhfMan!
I re-posted it in … the official Adobe InDesign forum … :(
Theunis De Jong
MemberReminiscent of the ol' “What Happend to Cmd+H” discussion on the Mac!
For Windows, Alt+Spacebar always has had a function; this is from Microsoft's Windows 7 Shortcut Key list:
“ALT+SPACEBAR
Open the shortcut menu for the active window”
I'm not sure why Windows would issue a *ping* when it actually should display the Window menu. In any case, it's Adobe's fault (!) for trying to work around system-defined shortcut keys — again.
Theunis De Jong
MemberIt really mainly depends on what your coupons look like. If your design uses lots of Illustrator effects, you'd make them in Illy. If it's just the odd text placed here or there, you might as well create them entirely in InDesign.
It's also possible to make it a hybrid: do the graphic intensive work in Illustrator and leave out all variable data. Place in InDesign, draw a text frame over it, put your variable data into that.
… the ability to assign a global expiration date for all coupons within a given book. (I haven't explored that yet, but I think it's possible)
Absolutely — look up “Text Variables” in the InDesign Help. It's a breeze.
Oh — and on
.. access to an outer stroke on text in InDesign, (which doesn't seem to exist in Illustrator) ..
.. well … it's as straightforward as in InDesign. Select text; select “stroke” rather than “fill”, then change the color …
Theunis De Jong
Member.. the no break setting's a load of crap when the Adobe Paragraph Composer is turned on.
Can you expand on that? Perhaps your URLs are too long to fit comfortably on a single line. The Paragraph Composer should try to work around it by distributing the excess space all over the entire paragraph, where the Single-line Composer just gives up, spaces out that one line beyond belief, then merrily continues with the rest of the text.
Theunis De Jong
Member(cough) “No Break”? In the Character panel?
(It's possible to put No Break in a character style and then relentlessly have it applied using a GREP style. However, I would recommend against such a draconic measure, because sometimes URLs can be very very long …)
Theunis De Jong
MemberIt would, except I don't know how to express that in a script. I haven't encountered any 'bad' character directions myself — so far, and hoping to continue that.
If you don't mind logging on to Adobe, you could ask this in the InDesign Scripting Forum. There are a couple of regulars over there that work with ID ME or are otherwise familiar with other language directions.
Theunis De Jong
MemberSure. Look in the Print Options dialog … In the Marks & Bleed section, you can find “Page Information”.
That's a basic option. For a text you want to format any way you like, you can draw a text frame in the Bleed area of your document and put a Text Variable “File Name” in that.
-
AuthorPosts
