How to make a toolbar script that runs "Save script to data table"?I saw the below very inspiring talk from Steve Hampton, about saving clicks, and have since then made myself a number of time-saving toolbar scripts. One thing I do repeatedly is "save script to data table" whenever I think I made a nice graph, to prevent myself from destroying it when trying to refine it. Every save takes me a handful of clicks. Tried to make a script for that, but no success.
I would be very happy for suggestions on how to make such a script to embed in a toolbar.
Stay in the Flow With Custom Scripts and Toolbars (2022-US-30MP-1081) - JMP User Community
Automation and ScriptingWindowsRe: How to make a toolbar script that runs "Save script to data table"?This will most definitely require error-handling and some checks but basic idea could be: use XPath to find outlineboxes with helpkey attribute and then get scriptable object from those and then send the message.
Names Default To Here(1);
obs = (Current Report() << XPath("//OutlineBox[@helpKey]"));
objs = obs << Get Scriptable Object;
objs[1] << Save Script to Data Table;
There might also be better messages than << Save Script to Data Table (Save Script for All Objects or Save Script for All Objects To Data Table)
Re: How to make a toolbar script that runs "Save script to data table"?That worked nicely! I went for the All Objects variant. Many thanks @jthi for always being fast and helpful!
Re: How to make a toolbar script that runs "Save script to data table"?Hey @Ake !
Glad the talk was inspiring! @jthi once again has provided a great scripting option but I was wondering if the build in toolbar "Report" would also work for you. It has a "Save Script to Data table" button in it.

Steve
Re: How to make a toolbar script that runs "Save script to data table"?That is even better as it will be much more robust than trying to tinker with as it uses the built-in command.
Edit: I did remember that you could run those built-in commands also somehow, and it was via Main Menu (if you for some reason wish to script it)

Main Menu("PLATFORM:SAVE SCRIPT:SAVE SCRIPT TO DATA TABLE")

Re: How to make a toolbar script that runs "Save script to data table"?Thanks for the input! I will try both methods (built-in two-click and scripted one-click) to see what sticks! Thanks a lot to both @shampton82 and @jthi for never failing support!