{"id":1034,"date":"2015-01-12T17:53:02","date_gmt":"2015-01-12T22:53:02","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=1034"},"modified":"2018-12-11T02:32:57","modified_gmt":"2018-12-11T01:32:57","slug":"ole-automation-scripts-with-32-and-64-bit","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2015\/01\/12\/ole-automation-scripts-with-32-and-64-bit\/","title":{"rendered":"Running OLE automation scripts with 32- and 64-bit versions of AmiBroker"},"content":{"rendered":"
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.<\/p> The following Microsoft help resources show how to change the file associations: The other thing to remember is the fact that in 64-bit Windows there are actually two JavaScript engines, 32- and 64-bit. The location of those programs are:<\/p> If only one AmiBroker version installed, Windows would launch this installed version regardless of which scripting engine was used.<\/p> 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:<\/p> (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).<\/p>","protected":false},"excerpt":{"rendered":" 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:http:\/\/www.amibroker.com\/guide\/objects.htmlhttp:\/\/www.amibroker.com\/newsletter\/01-2000.htmlIn case of any problems with execution of automation scripts, the very first […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1034"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":2,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1034\/revisions"}],"predecessor-version":[{"id":1537,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1034\/revisions\/1537"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=1034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=1034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
http:\/\/www.amibroker.com\/guide\/objects.html<\/a>
http:\/\/www.amibroker.com\/newsletter\/01-2000.html<\/a><\/p>
http:\/\/windows.microsoft.com\/en-us\/windows\/change-default-programs#1TC=windows-7<\/a>
http:\/\/windows.microsoft.com\/en-us\/windows-8\/choose-programs-windows-uses-default<\/a><\/p>32-bit
C:\\Windows\\SysWOW64\\CScript.exe
64-bit
C:\\Windows\\System32\\CScript.exe
<\/code><\/p>C:\\Windows\\SysWOW64\\CScript.exe Filename.js
<\/code><\/p>