*I found a couple of very similar posts that were resolved in the past, but I've failed to utilize the solutions....sorry for this being a duplicate post.
I'm trying to add a script triggered by a button click that can save the currently open report generated from Gaussian process modeling as a .pptx file. I've found a relevant example of << save presentation( ... ) in the scripting index but have been unable to place this as a functional argument of the Button Box( "test", [here]).
Here is my script so far:
// "//!" placed at the first line of script results in auto-run rather than to open the script
// //!
//opens a new window
w = New Window( "Load Your Data Table",
Text Box( "Choose an Excel file in which your data is linearized into
columns and transformed into Log10[x]." ),
//button to load data
Button Box( "1. Load data table", dt = Open( ) ),
//button to set column type
Button Box( "2. Set column type to Numeric/Continuous", dt = current data table();
for (i = 1, i <= ncols(dt), i++, column(dt, i) << data type(numeric);
column(dt, i) << set modeling type(continuous))),
//button to initiate Gaussian modeling
Button Box( "3. Gaussian modeling", obj = Gaussian Process(Estimate Nugget(1),
Set Correlation Function("Cubic"), Profiler(1),
SendToReport( Dispatch( {}, "Model Report", OutlineBox, {Close( 1 )})),
//automatically saves the Gaussian analysis as a script to the data table
<< Save Script to Data Table(
"Gaussian modeling",
<<Prompt( 0 ),
<<Replace( 0 )));
//new window with help text
New Window( "Help", fontobj = text = Text Box( "For the X-axis: choose the assay variables that have been titrated.
For the Y-axis: choose the signal to background data.
Then click OK; this script will be saved to the current analysis." ), << Justify Text("center") )),
//button to save report to a pptx
Button Box( "4. Save report to a powerpoint", [here] ) ),
//button to close the original window
Button Box( "Close", w << Close Window)
);