The Photoshop UI palette uses BridgeTalk to allow interaction with the palette buttons. The. idea was to use functions and a switch statement to add functionality to the UI buttons. It turns out, BridgeTalk uses a different type of function and does not work with a switch statement. A workaround was suggested which includes wrapping the functions in the bt.body and copying the bt.body to an external file where they can be treated with regular photoshop functions. Every time the script runs the by.body is copied to an external file overwriting the previous version.
Can somebody check the script and suggest how to proceed. I have been stuck for a few days and unable to find a similar UI pallet script to reference.
I did not look how much your script differs from Photoshop UI button toggle (scripting) thread you created, but BridgeTalk is common for all Adobe applications using ExtendScript, not mere Bridge. That you posted is not related to Bridge Scripting section, actually there is nothing specific this topic to be here. Unless this query isn't continuation of linked one to get locked as duplicate, moderator please move it to: Actions and scripting