Scriptable or modifyable User Buttons
Posted: 23 Jun 2024 09:45
Is it possible (or could it be) to use scripting or condition checks to modify User-defined buttons? Such as to display a toggle state similar to the way some of the built-in toolbar buttons work, or to change the icon programmatically.
To give one example, the builtin Details button displays as toggled when the view is in Details mode, while the Thumbnails button shows as toggled when the view is in any of the 3 available thumbnail modes. I'd like to create separate user buttons for each different thumbnail modes and have the correct one show as toggled (either through the actual UI "toggle" state, or just by changing the icon), and also not have the behavior of the current Details/Thumbs buttons of cycling that same state off if clicked again. I think there's all kinds of other cool things that could be done too if one could programmatically change the name, icon, and maybe even click behavior of user-defined buttons via other scripts (though the buttons' own click scripts could account for that).
scripted icon-changing concept (courtesy of photoshop)

To give one example, the builtin Details button displays as toggled when the view is in Details mode, while the Thumbnails button shows as toggled when the view is in any of the 3 available thumbnail modes. I'd like to create separate user buttons for each different thumbnail modes and have the correct one show as toggled (either through the actual UI "toggle" state, or just by changing the icon), and also not have the behavior of the current Details/Thumbs buttons of cycling that same state off if clicked again. I think there's all kinds of other cool things that could be done too if one could programmatically change the name, icon, and maybe even click behavior of user-defined buttons via other scripts (though the buttons' own click scripts could account for that).
scripted icon-changing concept (courtesy of photoshop)
