January 12, 2015
Automation scripts written in JScript or VBScript are supposed to be run from Windows Explorer to control AmiBroker from outside and run certain predefined tasks specified in the script. The recommended documentation explaining the automation interface and AmiBroker object model is presented here:
In case of any problems with execution of automation scripts, the very first thing to check is the .js (JScript) or .vbs (VBScript) file association within the Windows Control Panel. This determines which program in Windows executes the files with .js extension. By default that should be Windows Scripting Host, which is the default scripting engine integrated into Windows.
The following Microsoft help resources show how to change the file associations:
If only one AmiBroker version installed, Windows would launch this installed version regardless of which scripting engine was used.
Things look differently if you installed both 32-bit and 64-bit versions of AmiBroker on the very same machine. In this case 32-bit scripting engine would open 32-bit AmiBroker while 64-bit scripting engine would open 64-bit AmiBroker.Therefore, if we want to specifically launch 32-bit AmiBroker, then pointing at the particular engine by using command line may be required:
(this one is for 32-bit version, the path names are in fact quite confusing, since Microsoft uses System32 folder for 64-bit programs in a 64-bit system).