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

[amibroker] Re: VBScript within AFL Function ?



PureBytes Links

Trading Reference Links

I can get it to run a variety of different ways ... EXCEPT as 
described in the title ... VBScript within AFL Function ... You have 
removed the function which is what I need to be able to do ...

--- In amibroker@xxxxxxxxxxxxxxx, "Grover Yowell" <gyowell@xxx> wrote:
>
> Fred,
> I've just started to look at vbscript, but I tried your program and 
found
> the same results as you.  Also, I noted that when I inserted your 
program as
> an indicator, or in AA, it caused the main chart to disappear and a 
program
> execution error.
> 
> At that point I simplified your program and tried the following 
with the
> same result:
> EnableScript("VBScript");
> y=6;
> printf(NumToStr(y) + "\n");
> <%
>        	 R = AFL.Var("y")
>  		MsgBox CStr(R)
> 		AFL.Var("t")=R+1
> %>
> printf(NumToStr(t) + " end\n");
> 
> Again, the MsgBox popped up with the correct result but program 
execution
> halted and the main chart disappeared.
> 
> 
> At that point, I eliminated the MsgBox line and everything worked.  
So I
> think the problem in the MsgBox statement.  Don't have a clue on 
what is
> causing the problem.  I am running Windows XP Pro.  I have also 
tried to run
> the Jscript for export image within AFL and found a similar problem 
of
> execution halting.
> 
> Hope this helps.
> 
> Grover
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Fred
> Sent: Monday, October 02, 2006 17:40
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] VBScript within AFL Function ?
> 
> Anyone have a clue why this apparently doesn't work ?
> 
> RRR apparently never gets the value of what is in YYY and thus 
never 
> returns it to TTT. The MsgBox also shows RRR to be non existant. 
> There are however no problems with SSS which is set in VBS.  It 
shows 
> in the message box and via printf.
> 
> EnableScript("VBScript");
> 
> function XXX(YYY)
> {
>     ZZZ = 0;
> 
>     printf(NumToStr(YYY) + "\n");
> 
>     <%
>         RRR = AFL.Var("YYY") 
>         SSS = 7
> 
>         MsgBox CStr(RRR) + " " + CStr(SSS)
> 
>         AFL.Var("TTT") = RRR
>         AFL.Var("UUU") = SSS
>     %>
> 
>     printf(NumToStr(TTT) + "\n");
>     printf(NumToStr(UUU) + "\n");
> 
>     ZZZ = 0;
> 
>     return;
> }
> 
> XXX(6);
> 
> 
> 
> 
> 
> 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
>