א
ארז_בלבנון
אורח
קו בין טורים באינדיזיין, רק בצורה ידנית.
לגבי אוטומציה, יש לי סקריפט שעושה את הפעולה הזאת.
הנה הוא, אם תדע להסתדר.
תעתיק אותו כמו שהוא, תן לו שם עם סיומת JS ותריץ, אם יעבוד הרווחת.userHoriz = app.documents[0].viewPreferences.horizontalMeasurementUnits;
userVert = app.documents[0].viewPreferences.verticalMeasurementUnits;
app.documents[0].viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
app.documents[0].viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
theBox = app.selection[0];
var boxBounds, colCount, theGutter, width, i;
var lineBounds = new Array(4);
with (theBox){
boxBounds = geometricBounds;
colCount = textFramePreferences.textColumnCount;
theGutter = textFramePreferences.textColumnGutter;
theInset = textFramePreferences.insetSpacing;
//strokeWeight gibt bei "0" "1" zurck,
//sonst den Wert, der zuletzt eingestellt war, bevor wieder
//im GUI auf "0" gesetzt wurde
//kann das die Lצsung sein? - Sollte sie nicht!
if (strokeColor.name == "None") {
strokeWeight = 0;
}
theStroke = strokeWeight;
if (theStroke > 0) {
switch (strokeAlignment) {
case StrokeAlignment.centerAlignment :
theStroke = theStroke / 2;
break;
case StrokeAlignment.outsideAlignment :
theStroke = 0;
break;
}
}
// hier wהr mal 'ne Idee gefragt:
if (typeof(theInset) == "object"){
obenInset = theInset[0];
linksInset = theInset[1];
untenInset = theInset[2];
rechtsInset = theInset[3];
}
else {
obenInset = theInset;
linksInset = theInset;
untenInset = theInset;
rechtsInset = theInset;
}
width = boxBounds[3] - boxBounds[1] - rechtsInset - linksInset - 2*theStroke;
colWidth = (width - (colCount -1) * theGutter) / colCount;
// fraglich, ob das sie richtige Anzahl ist.
// Vielleicht will man lieber textColumns.length zהhlen?
for (i = 1; i < colCount; i++){
var k = i-1;
lineBounds[0] = boxBounds[0] + obenInset + theStroke;
lineBounds[1] = boxBounds[1] + linksInset + theStroke + (i*colWidth + k*theGutter + theGutter/2) ;
lineBounds[2] = textColumns[k].lines.lastItem().baseline;
if (textColumns.lines.lastItem().baseline < textColumns[k].lines.lastItem().baseline) {
lineBounds[2] = textColumns.lines.lastItem().baseline;
}
lineBounds[3] = lineBounds[1];
oneLine = document.pages.item(0).graphicLines.add(undefined, undefined, undefined, {geometricBounds: lineBounds, strokeWeight:
0.5,strokeAlignment:StrokeAlignment.centerAlignment});
}
}
app.documents[0].viewPreferences.horizontalMeasurementUnits = userHoriz;
app.documents[0].viewPreferences.verticalMeasurementUnits = userVert;
לגבי אוטומציה, יש לי סקריפט שעושה את הפעולה הזאת.
הנה הוא, אם תדע להסתדר.
תעתיק אותו כמו שהוא, תן לו שם עם סיומת JS ותריץ, אם יעבוד הרווחת.userHoriz = app.documents[0].viewPreferences.horizontalMeasurementUnits;
userVert = app.documents[0].viewPreferences.verticalMeasurementUnits;
app.documents[0].viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
app.documents[0].viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
theBox = app.selection[0];
var boxBounds, colCount, theGutter, width, i;
var lineBounds = new Array(4);
with (theBox){
boxBounds = geometricBounds;
colCount = textFramePreferences.textColumnCount;
theGutter = textFramePreferences.textColumnGutter;
theInset = textFramePreferences.insetSpacing;
//strokeWeight gibt bei "0" "1" zurck,
//sonst den Wert, der zuletzt eingestellt war, bevor wieder
//im GUI auf "0" gesetzt wurde
//kann das die Lצsung sein? - Sollte sie nicht!
if (strokeColor.name == "None") {
strokeWeight = 0;
}
theStroke = strokeWeight;
if (theStroke > 0) {
switch (strokeAlignment) {
case StrokeAlignment.centerAlignment :
theStroke = theStroke / 2;
break;
case StrokeAlignment.outsideAlignment :
theStroke = 0;
break;
}
}
// hier wהr mal 'ne Idee gefragt:
if (typeof(theInset) == "object"){
obenInset = theInset[0];
linksInset = theInset[1];
untenInset = theInset[2];
rechtsInset = theInset[3];
}
else {
obenInset = theInset;
linksInset = theInset;
untenInset = theInset;
rechtsInset = theInset;
}
width = boxBounds[3] - boxBounds[1] - rechtsInset - linksInset - 2*theStroke;
colWidth = (width - (colCount -1) * theGutter) / colCount;
// fraglich, ob das sie richtige Anzahl ist.
// Vielleicht will man lieber textColumns.length zהhlen?
for (i = 1; i < colCount; i++){
var k = i-1;
lineBounds[0] = boxBounds[0] + obenInset + theStroke;
lineBounds[1] = boxBounds[1] + linksInset + theStroke + (i*colWidth + k*theGutter + theGutter/2) ;
lineBounds[2] = textColumns[k].lines.lastItem().baseline;
if (textColumns.lines.lastItem().baseline < textColumns[k].lines.lastItem().baseline) {
lineBounds[2] = textColumns.lines.lastItem().baseline;
}
lineBounds[3] = lineBounds[1];
oneLine = document.pages.item(0).graphicLines.add(undefined, undefined, undefined, {geometricBounds: lineBounds, strokeWeight:
0.5,strokeAlignment:StrokeAlignment.centerAlignment});
}
}
app.documents[0].viewPreferences.horizontalMeasurementUnits = userHoriz;
app.documents[0].viewPreferences.verticalMeasurementUnits = userVert;