Sorry you are still having trouble. Can you tell me which version of Photoshop you are using and details about the document you are using. Bit depth, color mode, etc.
pierrelabbe wrote:My version is : 12.0.1 (in French) File 8 bit in RGB with PSD format
Except for mine is English that is what I have been doing most of my testing with. I can't get it to give me that error. If I cancel out of the Adobe color picker I do get an error but it is at a different place. From the error it looks like color is undefined but I do not understand why. I will contact you via email and we can try to solve this if you like.
If I have only one single smart object layer, it does not work yet correctly. I can select no color. After execution the script the smart object layer is bordered transparency.
Now one more batch funktion would be great. Maybe it also goes with settings (*.ini or *.xml) - save for batch settings and load for batch settings?
A document needs to have a background layer for the border color to be applied. If it does not have a background layer the border is transparent. I do not think I want the script to add a background layer if the user took the effort to remove it from the document.
But here is a version that stores the last user settings and is recordable by an action so it can be batched.