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

[amibroker] Windows.Add(), NewWindow.Close()



PureBytes Links

Trading Reference Links

Hello:
I'd like to be able to manage the number of charts that appear, seemingly out of nowhere, as a run a multi step script;
so along those lines,  I thought I'd explore the attached script that was introduced with 4.83.
However when I run this I get a large number of DocsQty on the order of 17, and I can't reason out why this is so high.   How are those documents associated with the default window that I'm using?
And when I add and close a window I don't see the evidence of this. Like nothing changes.
  
I'm missing something fundamental here and wondering if someone would help me?
 
Thanks in advance
Joe L.
 
 
outBuffer = ""; // global output string buffer
 
function output( string )
{
   outBuffer = outBuffer + string + "\n";
}
 
AB = new ActiveXObject( "Broker.Application");
 
Docs = AB.Documents;
DocsQty = Docs.Count;
 
WScript.echo("Num of Docs = "+ DocsQty );
for( i = 0; i < DocsQty; i++ )
{
   Doc = Docs( i );
   output( "Document " + i + " name : " + Doc.Name );
   Windows = Doc.Windows;
   WinsQty = Windows.Count;
 
   for( j = 0; j < WinsQty; j++ )
   {
     Win = Windows( j );
       output( "  Window " + j + " Selected tab " + Win.SelectedTab );
   }
}
 
WScript.echo( outBuffer );
WScript.echo( "Now will add one window" );
Doc = Docs( 0);
Windows = Doc.Windows;
NewWindow = Windows.Add();
WScript.echo( "Now will add another window" );
NewWindow = Windows.Add();
WScript.echo( "and close it" );
NewWindow.Close();
 
 
__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
BEGIN:VCARD
VERSION:2.1
N:Landry;Joe
FN:Joe
ORG:Houston Investors Association
TITLE:VP Programs
TEL;WORK;VOICE:281-486-5567
ADR;WORK:;;2222 Cullen;Houston;Texas;77005;USA
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:2222 Cullen=0D=0AHouston, Texas 77005=0D=0AUSA
URL;WORK:http://houstoninvestors.com
EMAIL;PREF;INTERNET:jelandry@xxxxxxxxxxxxx
REV:20070619T220454Z
END:VCARD