http:\/\/www.amibroker.com\/guide\/objects.html<\/a><\/p>Below is a sample JScript code that shows how to use OLE interface from the script:<\/p>AB <\/span>= new <\/span>ActiveXObject<\/span>(<\/span>"Broker.Application"<\/span>);
<\/span>AW <\/span>= <\/span>AB<\/span>.<\/span>ActiveWindow<\/span>;
<\/span>AW<\/span>.<\/span>ExportImage<\/span>( <\/span>"C:\\\\example.gif"<\/span>, <\/span>640<\/span>, <\/span>480 <\/span>); <\/span>\/\/ 640, 480 are pixel dimension<\/code>The code is intended to be used from the outside of AmiBroker.<\/p>
To use above code follow these steps:<\/p>
- Open Notepad
- Copy-paste above the code
- Save the file with .JS extension (which means that system will treat this as JScript code)
- Make sure that AmiBroker is running with desired chart as active one
- Double click on .JS file to execute the JScript code<\/ol>
After doing so, resulting example.gif<\/strong> image file can be found on C:<\/strong> drive.<\/p>OLE automation can also be used from any other COM\/OLE-aware programs\/languages.<\/p>","protected":false},"excerpt":{"rendered":"
Charts can be exported as GIF or PNG files either manually or programmatically.To export chart image manually, simply use Edit->Image->Export to file menu. Instead of exporting you can also copy the image to Windows clipboard (Edit->Image->Copy As Bitmap – this will copy bitmap image or Edit->Image->Copy As Metafile – this will copy vector\/scalable graphic).In order […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[55,31,18],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/595"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":2,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/595\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}