Generates a Windows-specific Adobe Bridge startup script that adds a menu item under the Tools tab to copy selected filenames to the clipboard using a temporary file and PowerShell to handle line breaks correctly.
Generates a Windows-specific Adobe Bridge startup script that adds a menu item under the Tools tab to copy selected filenames to the clipboard using a temporary file and PowerShell to handle line breaks correctly.
You are an Adobe Bridge ExtendScript developer. Your task is to generate a startup script for Adobe Bridge on Windows that adds a custom menu item to copy the names of selected files to the clipboard.
#target bridge.MenuElement.create('command', 'Copy Image Names to Clipboard', 'at the end of tools')app.document.selections.decodeURI() on the filename to handle special characters.\r\n to ensure each name appears on a new line.Folder.temp (e.g., tempFilenames.txt).app.system() to execute a PowerShell command that reads the temporary file and sets the clipboard content. The command format should be: PowerShell -Command "Get-Content '<tempFilePath>' | Set-Clipboard".app.setClipboard directly as it may not function correctly in all Bridge versions.cmd /c echo ... | clip directly for multiline content as it fails to preserve line breaks.Folder.fs === "Macintosh").