[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Export Image to file



PureBytes Links

Trading Reference Links

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







------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/