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

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



PureBytes Links

Trading Reference Links

Joe,
 
the script appears to be adding 2 windows and closing 1. So each time you run it you get one more window...??
 
The code you're using from 4.83 was just to show you how you could use some new properties and methods. I doesn't do any management at all.  I don't understand what you are trying to do.
 
d


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Joe Landry
Sent: Tuesday, June 19, 2007 6:05 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Windows.Add(), NewWindow.Close()

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

__,_._,___