JSL: How to execute a script when you close a window?Hi,
I have a scripting question.
A customer would like to generate a .PNG capture of the report (for exampleGraph buidler or whatever in the report) when he clicks on the Close button of this report.
I imagined that something like that would do the job, but nothing appends:
gb=Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables( X( :Pressure_setting ), Y( :KPI ) ),
Elements( Points( X, Y, Legend( 3 ) ), Line Of Fit( X, Y, Legend( 5 ) ) )
);
gb<< Set Closeable;
gb<<SETCLOSE></SETCLOSE>
Any idea about how to do that?
Thank a lot for your suggestions,
Florence
Re: JSL: How to execute a script when you close a window?Yes, you are right!
thank a lot!
Florence
Re: JSL: How to execute a script when you close a window?Hi,
I don't really know but try putting in a file path other than "C:\example.png". When I try it the way you did nothing happends, but a different path (eg: "C:\Users\SNLHMY\Desktop\example.png") seems to work.
Re: JSL: How to execute a script when you close a window?HI Hadley,
Thank for your help,
the first time I run the script, I have the Graph but nothing append when I close, the second time, I have a message saying me that the file has not been saved.
why?
Florence
Re: JSL: How to execute a script when you close a window?Hi Florence,
Try this:
gb=Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables( X( :Pressure_setting ), Y( :KPI ) ),
Elements( Points( X, Y, Legend( 3 ) ), Line Of Fit( X, Y, Legend( 5 ) ) )
);
gb<< Set Closeable;
gb<<ON close=""></ON>