Hi Aaron, try this version. Select your Embedded images before running. For your sample, I unclipped the dots before running.
// script.name = relinkAllSelected_rasters.jsx; // script.description = relinks all selected placed images at once; // script.required = select at least one linked image before running; // script.parent = CarlosCanto // 7/12/11; Update 7/24/17; // script.elegant = false; var idoc = app.activeDocument; sel = idoc.selection; if (sel.length>0) { var file = File.openDialog ("open file"); file = new File(file.fsName.replace("file://","")); // Mac OS Lion fix by John Hawkinson for (i=0 ; i<sel.length ; i++ ) { if (sel[i].typename == "PlacedItem") { var iplaced = sel[i]; iplaced.file = file; } if (sel[i].typename == "RasterItem") { var iplaced = idoc.placedItems.add(); iplaced.file = file; var fctrx = iplaced.width/2; // get the rectangle's center coordinates var fctry = iplaced.height/2; // iplaced.position = sel[i].position; h = sel[i].height; w = sel[i].width; x2 = sel[i].left; y2 = sel[i].top; iplaced.position = [fctrx-w/2+x2, fctry+y2+h/2]; sel[i].remove(); } } } else { alert("select at least one placed item before running"); }