PS script for batch re-linking missing files in nested smart objects without "missing links" dialog
please allow a help request to all PS scripting aficionados here,
i have a bunch of PSD files (let's name them "main files" with their layers being "level 1") with some layers containing embedded (not linked!) smart objects. inside of this smart objects (level 2) i have some linked smart objects inside of a group (level 3). so they are nested. the files linked here are living strictly in a subfolder of the folder where the main files live. let's call these files "sub files".
i managed to write a script to batch update all main files after the content of the sub files are edited. this works fine with opening every main file, scanning all layers, finding the smart objects, opening them, diving into the group and finding the linked smart objects within and updating them.
as the folder with the main files needs to be re-usable and to be copied/moved elsewhere, i need to have a second script to be executed as a preparation for re-linking all of the absolute file paths of the linked smart objects.
i did a lot of research in this community and in other forums, but didn't find a solution yet. especially the "missing links" dialog popping up after opening the embedded smart object layers (level 1, see above) stops all scripts and i didn't find a way to mute this dialog and continue searching/replacing the file path infos by my script. muting dialogs and script alerts didn't help here. besides this everything happening inside of the "missing link" dialog obviously isn't reachable for the script listener plugin. i only see the dialog being opened, nothing else.
basically, i only need a script for silently relinking all sub files to a relocated space in a subfolder of the main files. as the sub folder always has the same name, the relinking script should be able to run automatically as it finds the main files folder name because it's running within.
sorry for this longish post/request and thanks for listening and for any hints
thomas

