Alert Image if JobNumber not Match
hi all,
i need alert image, operator link in different location (both job number need match).
condition, indesign file path & image file path job number remains same.
i.e.,
indesign file path: /volumes/jobprod/print/01_live/2016_04/document/185000042_xxx_uld refresh tr
image path: /volumes/jobprod/print/01_live/2016_04/185000042_xxx_uld refresh tr/ss_logos/5.12_exr_1_tr.ai
var mypath = app.activedocument.filepath.fsname; var mjobnumber; var reg = /(\/)([0-9]{8})(_)/; if (mypath.match(reg)){ mjobnumber = regexp.$2; } alert(mjobnumber) //working fine var mygr = app.activedocument.allgraphics; for(i=0; i<mygr.length; i++) { //problem in below line if(mygr[i].itemlink.filepath.match(/mjobnumber/) == null) { app.select(mygr[i].parent) var check = confirm("selected images link path wrong\rdo want continue?"+ "\n") if (check == true) { //proceed further } else { exit(0); } } }
thanks in advance
siraj
hi siraj,
place 9 inside curly braces , try,
var reg = /(\/)([0-9]{9})(_)/;
regards,
chinna
More discussions in InDesign Scripting
adobe
Comments
Post a Comment