Why does the page number change
Hello
I need to change section marker manually all the time with choosing the page.
I want to change section marker without going to that page.
I wrote a script for that but script is corrupted and it changes the location of the page.
My aim is to write page number on script to change the section marker from that page
How can I fix this?
var w = new Window("dialog", "Section");
var panel = w.add('panel', undefined, "----");
var grup = panel.add('group', undefined, "");
grup.orientation = "row";
grup.add('statictext', undefined, "Page");
var sayfa = grup.add('edittext', [0, 0, 50, 25], "1")
grup.add('statictext', undefined, "Section Marker");
sayfa.graphics.font = "Tahoma:16";
var kisim_isaretcisi = grup.add('edittext', [0, 0, 50, 25], "A")
kisim_isaretcisi.graphics.font = "Tahoma:16";
kisim_isaretcisi.active = true;
w.add('button', undefined, 'Tamam', {name: 'OK'}).onClick = function() {
w.close(12345);
}
if(w.show() == 12345) {
var doc = app.activeDocument;
var syf = Number(sayfa.text);
var curSec = doc.pages.item(syf).appliedSection;
var name = curSec.name
var ksm = kisim_isaretcisi.text;
if(!syf){
syf = i;
}
doc.sections.add({pageStart: doc.pages.item(syf-1), marker: ksm, name : name })
}