Hello to all
I am a newbie or almost not a well experienced coder in AB
and if I have decided to post for getting help I am not moved
by laziness but because I have worked around this stuff above any
reasonable time....more than hours.
--------
I would like automatically export a chart to file ........
Looking on forums for help I have put together this code :
----------------------
/*Start*/
EnableScript("jscript");
<%
AB = new ActiveXObject("Broker.Application);
AFL("win") = AB.ActiveWindow;
%>
simb = Name()
outputdrive = "C:\\"
output = outputdrive + symb + ".png";
if( ParamTrigger( "Image export","Click" ) ) win.ExportImage( output, 800, 600
);
/*End*/
--------------------------
After having dragged and dropped in to the window of chart I opened Param
dialog and clicked the
button.
The best I got it was a chart saved to right loc. but with nothing in it :
(formula halted)
and crash AB with a report to send ....(Access violation).
I would be very very grateful to anyone who will show me the solution
I fear that it is something related to Object to be created or ActiveWindow.
Thanks
Giorgio