Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberSorry I forgot to add I'm on CS4.
Oof! What a relief. The simple 6-line script I wrote works perfectly, in that it converts all tables that start in your currently selected text frame to text (a table that's partially in a previous frame will not, one that starts in the current and runs into the next frame will). But– as I was just checking out CS5 for possible bugs, and the table system did not change, I thought “well, let's just do it”.
It does not work in CS5! Fortunately you thought of mentioning your version, but I'm gonna throw this spanner into the wheel of Adobe's scripting forum, just in case.
Copy the script, paste into Adobe's ESTK Editor and then save as “tablestotext.jsx” in the Scripts folder.
//DESCRIPTION:Convert Tables in Text Frame to text
// A Jongware production
// Jongware, 7-Jul-2010if (app.selection.length == 1 && app.selection[0] instanceof TextFrame && app.selection[0].tables)
{
last = app.selection[0].tables.length;
while (last > 0)
{
last -= 1;
app.selection[0].tables[last].convertToText();
}
}Theunis De Jong
MemberThere is an ongoing discussion about this on the Adobe user-to-user forum: Problems making a PDF from Indesign CS5
I don't think a one-fix-to-rule-them-all has been agreed upon, even though there are almost a 100 posts in that thread.
Theunis De Jong
MemberThere is an ongoing discussion about this on the Adobe user-to-user forum: Problems making a PDF from Indesign CS5
I don't think a one-fix-to-rule-them-all has been agreed upon, even though there are almost a 100 posts in that thread.
Theunis De Jong
MemberWorks for me :-)
Theunis De Jong
MemberOuch. Foiled again! by the smart character formatting script that runs this site …
In this case, two consecutive hyphens – – were automatically converted to an en-dash –, which is great, really, for a general text, but not so great for code. Please adjust manually … I'm sure (fairly … a bit …) the script ought to run fine under CS3 then.
(“Foiled again” because in the past I struggled with disappearing backslashes (fortunately there ought to be none in this script) and double quote marks, which were converted to “smart” curly ones … One more thing to keep an eye out when posting scripts.)
Theunis De Jong
MemberWorks for me :-)
Theunis De Jong
MemberOuch. Foiled again! by the smart character formatting script that runs this site …
In this case, two consecutive hyphens – – were automatically converted to an en-dash –, which is great, really, for a general text, but not so great for code. Please adjust manually … I'm sure (fairly … a bit …) the script ought to run fine under CS3 then.
(“Foiled again” because in the past I struggled with disappearing backslashes (fortunately there ought to be none in this script) and double quote marks, which were converted to “smart” curly ones … One more thing to keep an eye out when posting scripts.)
Theunis De Jong
MemberYeah, I've seen that before. Seems no-one at Adobe expected this! You could file a bug report …
This quick script searches for all stray points (with only one path and consisting of one single point) and deletes it. It seems to work, even if the single point is grouped with other objects, but I suspect it will fail if the point itself is locked or on a locked layer. If you find one, I'll add checks for those too.
p = app.activeDocument.allPageItems;for (i=p.length-1; i>=0; i–)
if (p[i].hasOwnProperty (“paths”) && p[i].paths.length == 1 && p[i].paths[0].pathPoints.length == 1)
p[i].remove();Theunis De Jong
MemberYeah, I've seen that before. Seems no-one at Adobe expected this! You could file a bug report …
This quick script searches for all stray points (with only one path and consisting of one single point) and deletes it. It seems to work, even if the single point is grouped with other objects, but I suspect it will fail if the point itself is locked or on a locked layer. If you find one, I'll add checks for those too.
p = app.activeDocument.allPageItems;for (i=p.length-1; i>=0; i–)
if (p[i].hasOwnProperty (“paths”) && p[i].paths.length == 1 && p[i].paths[0].pathPoints.length == 1)
p[i].remove();Theunis De Jong
Member(Two days later) Eh. That oughta be something like “As*Z” …
Theunis De Jong
Member(Two days later) Eh. That oughta be something like “\A*\Z” …
Theunis De Jong
MemberOh I see. My suggestion does work, and so did (probably) your own first try. Nothing happened because … the 'empty' cells are not empty!
If I zoom in on the image, I can see a few tiny blue markers, quite different from the standard '#' end-of-text marker. They are also visible in the “Email” field, so apparently they get found by that GREP expression.
I suggest using something like “As*Z” — any number of spaces, and hopefully that includes that unknown marker.
Theunis De Jong
MemberOh I see. My suggestion does work, and so did (probably) your own first try. Nothing happened because … the 'empty' cells are not empty!
If I zoom in on the image, I can see a few tiny blue markers, quite different from the standard '#' end-of-text marker. They are also visible in the “Email” field, so apparently they get found by that GREP expression.
I suggest using something like “As*Z” — any number of spaces, and hopefully that includes that unknown marker.
Theunis De Jong
Member1. Does this script help?
myDialog = app.dialogs.add ({name:”Style Notes”,canCancel:true});parstyles = app.activeDocument.paragraphStyles.everyItem().name;
with (myDialog)
{
with (dialogColumns.add())
{
with (dialogRows.add())
pstyle = dropdowns.add ({stringList:parstyles, selectedIndex:0});
}
}
if (!myDialog.show())
{
myDialog.destroy();
exit(0);
}s = app.activeDocument.paragraphStyles[pstyle.selectedIndex];
app.activeDocument.stories.everyItem().footnotes.everyItem().paragraphs.everyItem().appliedParagraphStyle = s;2. “Include Footnotes” is an option in Find/Change … one of the itty bitty icons under the “Search” field. I believe it's on by default.
Theunis De Jong
Member1. Does this script help?
myDialog = app.dialogs.add ({name:”Style Notes”,canCancel:true});parstyles = app.activeDocument.paragraphStyles.everyItem().name;
with (myDialog)
{
with (dialogColumns.add())
{
with (dialogRows.add())
pstyle = dropdowns.add ({stringList:parstyles, selectedIndex:0});
}
}
if (!myDialog.show())
{
myDialog.destroy();
exit(0);
}s = app.activeDocument.paragraphStyles[pstyle.selectedIndex];
app.activeDocument.stories.everyItem().footnotes.everyItem().paragraphs.everyItem().appliedParagraphStyle = s;2. “Include Footnotes” is an option in Find/Change … one of the itty bitty icons under the “Search” field. I believe it's on by default.
-
AuthorPosts
