verrry slick Bruce!
Thanks for the link - it'll come in handy for some other
things.
d
Joe, Fred, Dale, all -
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of bruce1r
Sent: Wednesday, March 08, 2006 5:39 PM
To: [email protected]
Subject: [amibroker] Re: jScripts to produce and save PNG plots.
Sorry for jumping in, but I saw your thread about resizing the AB
window for output to PNG for possible inclusion on a page or in a doc.
Significant image scaling in an image program or browser introduces
artifacts. Sounds like what you want to do is control the export
image size. For script programmers, there is a utility that allows
window resizing (and much more) called AutoIt. I'll show a quick AB
example.
AutoIt is a scripting language, but many functions are implemented in
an ActiveX DLL that is callable from script outside or inside of AB.
First you install the package, or just the component, AutoItX3.dll via
REGSVR32. You can get it at -
http://www.autoitscript.com/autoit3/
Then, here's an example AFL script that resizes the main
AB window.
There is an issue, though. First, the image size is obviously less
than the window size. For example, in a 800x600 window with left
hidden workspace, toolbar at top and right, and a status bar at the
bottom - the PNG image size is 743x505. It would desirable to be able
to be able to control this directly. One can come close
with AutoIt, though.
Anyway, here's the AFL/Script code that uses the AutoItX3 DLL -
EnableScript("_vbscript_");
<%
Set oAB = CreateObject( "Broker.Application" )
Set oAutoIt = CreateObject( "AutoItX3.Control" )
ABTitle = "AmiBroker"
xpos = oAutoIt.WinGetPosX( ABTitle )
ypos = oAutoIt.WinGetPosY( ABTitle )
width = oAutoIt.WinGetPosWidth( ABTitle )
Height = oAutoIt.WinGetPosHeight( ABTitle )
newwidth = 800
newheight = 600
oAutoIt.WinMove "AmiBroker", "", xpos, ypos, newwidth, newheight
oAB.RefreshAll()
%>
Buy = Sell = Short = Cover = 0;
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
Investment management software Real estate investment software Investment property software Software support Real estate investment analysis software Investment software
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
