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
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();