Mike --
That's probably what I need. I'm going to have to come up to speed a bit on jscipt first though. Right now, I'm getting syntax error on the AX = ... line below:

|AB = CreateObject("Broker.Application");
EnableScript( "jscript" );
AX = new ActiveXObject("Broker.Application");
// Editor: Error 30. Syntax error|

I'm guessing that there is a M$ something that I have to install to fix it.

I'm also having problems understanding "AmiBroker's OLE Automation Object Model" in the AB Users Manual. Is there a "for Dummies" version available somewhere?

Thanks for your help.
-- Keith


On 3/16/2010 05:15, Mike wrote:

From javascript:

var ab = new ActiveXObject("Broker.Application");

ab.LoadDatabase(...);
ab.ActiveDocument.Name = "ORCL";

If there is no active document (i.e. no open charts) then you will get an exception. Haven't gotten around to looking into how to set the active document when none present.

Mike

--- In [email protected] <mailto:amibroker%40yahoogroups.com>, Keith McCombs <kmcco...@...> wrote:
>
> Does anyone know how one might programmatically set the current ticker.
> Not SetForeign().
>
> My reason is that I have written a function that runs fine, as long as
> the 'current' ticker has some data. However, if the current ticker has
> no data, then the function does not work. Its purpose is to load new
> tickers and set static variables from a list. It doesn't actually _do_
> anything with the current ticker.
>
> I've looked through all the functions in the 5.20 manual and the OLE
> Object Model. But couldn't find anything that I thought might work.
>
> Thanks in advance, for any and all help.
> -- Keith
>


Reply via email to