how do i save the workspace including the analysis window

0 votes
asked Jun 1, 2017 in AmiBroker by angad
want to save the current screen including the anaylsis window as it is.  how do i do it ?

2 Answers

0 votes
answered Jun 1, 2017 by admin (9,260 points)

The chart layout / workspace includes only charts. Analysis window or any other non-chart window is not part of chart layout.

commented Jun 1, 2017 by Explorer
It would be great if Analysis windows were saved in the layouts too.
commented Jul 2, 2017 by pyhrus
I do agree - One vote plus .

   It's an obvious fonctionality for this quality grade  software, that lack a lot for a practical use of AmiBroker  .
0 votes
answered Sep 24, 2017 by msmaamama

Automatically open charts/layout AND some Analysis windows

What if I want to automatically open charts/layout AND some Analysis windows in Amibroker?  I can save charts in Layouts, but not Analysis windows.  Those are saved in .apx files.  And only one Analysis window is saved in an .apx file.

There is a way to open all desired windows, through OLE:

1) Create a JScript file (txt file with extention .js).  In my case I named it AmibrokerPA.js.  Inside it write code similar to this:

// I need to open Amibroker first, then execute this script

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

// close any open charts in Amibroker.
docs = ab.Documents() ;
docs.close() ; 

// close any open AA in Amibroker.
adocs = ab.AnalysisDocs() ; 
adocs.close();

ab.loadLayout ( "C:\\Program Files\\AmiBroker\\forex-hist\\Layouts\\PALiveAnalysis.awl");
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PALower.apx" ); 
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PATrading.apx" ); 
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PAHigher.apx" ); 
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PAExtraLarge.apx" ); 



2) Teach Windows to run .js scripts with the C:\Windows\System32\wscript.exe :
From windows explorer, right click (on the .js file) > Openwith > Choose Default program, go to C:\Windows\System32 and select wscript.exe.

3) Open Amibroker.

4) From Windows Explorer, double click the AmibrokerPA.js script, to run it.

Note: This solution may be particular to my setup: Windows 7 64 bit with Amibroker 64 bit.

Resources:
https://groups.yahoo.com/neo/groups/amibroker/conversations/topics/189797
http://www.amibroker.com/kb/2015/01/12/ole-automation-scripts-with-32-and-64-bit/
...