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

Re: [amibroker] Starting AB from script - AB version 4.78.1 / Windows 2000



PureBytes Links

Trading Reference Links

Ara,
 
Yes you are right in that new ActiveXObject() syntax should be used in JScript.
CreateObject should only be used in VBScript.
 
As to your question: I have tested it and AB does not remain running on my machine
after script is finished (of course AB was NOT running before so it was created and closed by script)
 
I have used this simple script:
AB = new ActiveXObject("Broker.Application");
AA = AB.Analysis;
AA.Scan();
 
If you are having problems you may add AB.Quit() call at the end of your script.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Saturday, March 25, 2006 5:44 AM
Subject: Re: [amibroker] Starting AB from script - AB version 4.78.1 / Windows 2000

TJ,
 
Thanks... got AB to start properly and complete the scripts ... using
AB = new ActiveXObject("Broker.Application");
 
 
Problem / Question:  At the end of the scripts, AB remained active (in task Manager), and the AA window remained on the screen, contrary to your comments below.
 
Closing the AA window did not remove Broker.exe from task Manager. I had to explixitly terminate from within Task Manager.
 
 
AB was not running when I initiated the script.
 
 
Also if this info is useful... when I use:
AB = CreateObject("Broker.Application");  I get JScript Runtime Error: "Object Expected,  Code 800A138F
 
 
Any suggestions?
 
Ara
----- Original Message -----
Sent: Friday, March 24, 2006 4:10 PM
Subject: Re: [amibroker] Starting AB from script - AB version 4.78.1 / Windows 2000

Ara,
 
First, the path in _javascript_ has to be written with DOUBLE backslashes:
 
AB.LoadDatabase("D:\\AB Dbs\\QP3");
 
Second thing is that the behaviour you describe is normal:
 
You initiate AmiBroker, load database and THEN..... your script ends, and Windows Scripting host
automatically destroys all created objects (in this case: AmiBroker).
 
AmiBroker will be running ONLY FOR DURATION of your script (if it was created in the script).
 
AB will continue to run ONLY if it was running BEFORE script was started (so script did not create object but just attached to running instance).
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
To: AB-Main
Sent: Friday, March 24, 2006 10:39 PM
Subject: [amibroker] Starting AB from script - AB version 4.78.1 / Windows 2000

Am trying to start AB from a jscript....
 
AB = CreateObject("Broker.Application");
AB.LoadDatabase("D:\AB Dbs\QP3");
 
When I start the script, I see AB listed in the Pocesses (Task Manager) for about a second or so, then it's gone.
 
Anyone know what is happening?
 
Thanks
 
ara
 
 
 
 


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





YAHOO! GROUPS LINKS