昔作ったものですが…
CS3では動作します。。。
var myScale = app.activeDocument.viewPreferences.lineMeasurementUnits;
var tmpS = "";
if (myScale == 2054188905) tmpS = "pt";
if (myScale == 2053991795) tmpS = "mm";
var sel = app.activeDocument.selection[0];
try {
sel.cells.length;
var tmp = sel.cells[0].leftEdgeStrokeWeight;
var myDlg = app.dialogs.add({name:"線幅を変更する"});
var myDlc = myDlg.dialogColumns.add();
with(myDlc.dialogRows.add()){
var tmpFind = realEditboxes.add({editValue:tmp,minimumValue:0,maximumValue:800});
staticTexts.add({staticLabel:tmpS + "の罫線を"});
}
with(myDlc.dialogRows.add()){
var tmpChange = realEditboxes.add({editValue:tmp,minimumValue:0,maximumValue:800});
staticTexts.add({staticLabel:tmpS + "に変更する"});
}
flag = myDlg.show();
} catch(e) {
alert("セルを選択してください。");
exit();
}
var findWeigth = tmpFind.editValue;
var changeWeigth = tmpChange.editValue;
if (flag == true & findWeigth != changeWeigth) {
for (i = 0; i < sel.cells.length; i++) {
try {
if (sel.cells[i].leftEdgeStrokeWeight == findWeigth) {
sel.cells[i].leftEdgeStrokeWeight = changeWeigth;
}
} catch(e) {}
try {
if (sel.cells[i].rightEdgeStrokeWeight == findWeigth) {
sel.cells[i].rightEdgeStrokeWeight = changeWeigth;
}
} catch(e) {}
try {
if (sel.cells[i].bottomEdgeStrokeWeight == findWeigth) {
sel.cells[i].bottomEdgeStrokeWeight = changeWeigth;
}
} catch(e) {}
try {
if (sel.cells[i].topEdgeStrokeWeight == findWeigth) {
sel.cells[i].topEdgeStrokeWeight = changeWeigth;
}
} catch(e) {}
}
}
[17593] dot (2014/12/25 Thu 13:07)