I can’t directly help with scripting…
Looking into actions, an action can record the alteration of the Pantone Color Book Library source to a similar Lab colour value (say just chaning the b value from say 36 to 35 to force the Lab colour picker change to take effect).
So then I fired up an older version of Photoshop that had the ScriptListener plug-in installed, the output is never pretty, however it does appear that the changing of the colour can be scripted (the new Lab values are L71 a49 b35, however only the b value was changed from the original colour book):
var idsetd = charIDToTypeID( "setd" ); var desc2 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref2 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref2.putEnumerated( idChnl, idOrdn, idTrgt ); desc2.putReference( idnull, ref2 ); var idT = charIDToTypeID( "T " ); var desc3 = new ActionDescriptor(); var idClr = charIDToTypeID( "Clr " ); var desc4 = new ActionDescriptor(); var idLmnc = charIDToTypeID( "Lmnc" ); desc4.putDouble( idLmnc, 71.000000 ); var idA = charIDToTypeID( "A " ); desc4.putDouble( idA, 49.000000 ); var idB = charIDToTypeID( "B " ); desc4.putDouble( idB, 35.000000 ); var idLbCl = charIDToTypeID( "LbCl" ); desc3.putObject( idClr, idLbCl, desc4 ); var idSCch = charIDToTypeID( "SCch" ); desc2.putObject( idT, idSCch, desc3 ); executeAction( idsetd, desc2, DialogModes.NO );
I’m guessing that some of the script listener code is probably garbage!
If you have no other solution, you could script the creation of a new spot colour channel based on Lab rather than a Pantone Color Book Library and then apply image or calculations to copy the unwanted spot channel to the new spot channel and delete the original spot (then loop this through all remaining spots)… Not sure if you can script the naming of the channels based on the Lab values or capture their original Lab values.
I think i can get this to work. Thanks!