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

Re: [amibroker] Windows Automation: how to call AFL function from JS?



PureBytes Links

Trading Reference Links

Hello,

In short - you can't.

Scripting is old stuff - it was good when there was no looping and no used-defined functions
in AFL, but now you should rather try to write everything in AFL since
now it provides almost the same constucts as JScript, but simply works many times faster.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "bromba" <bromba@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, December 10, 2003 7:34 PM
Subject: [amibroker] Windows Automation: how to call AFL function from JS?


> hello,
> 
> is there any way of calling an AFL defined function from JS? so that 
> (for example) the following code would work:
> 
> EnableScript("jscript");
> function fAFL() { return 007*C; }
> 
> <%
> function fJS( argStr ) {
>    var str = argStr + "007";
>    AFL(str)= new Array();
>    AFL(str)= *and here I would like to invoke pure AFL function, fAFL*
> }
> %>
> 
> objScript = GetScriptObject();
> objScript.fJS("JamesBond");
> 
> and after that there would exist AFL variable named *JamesBond007* which 
> contains array of 0.007*C so that I could directly write:
> 
> Plot(JamesBond007, "JB007", colorRed);
> 
> I know it is possible to call JS function from AFL. how obout the 
> opposite? is it doable?
> 
> cheers,
> BM
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/