Sub Technic_Paint()
Set Grid =Technic.GetGridByName("Main")
if Grid is NoThing Then
Exit Sub
End if
CALL Grid.DrawRect(18,25,120,48,RGB(255,255,0),2)
call Grid.DRAWTEXT(20,28,"执行外部分析程序",500)
framename=application.GetActiveFrameName
if framename<> "Technic" then
Application.ActivateFrame "Technic"
end if
nname=Grid.StockName
ccode=Grid.IndexCode
application.MsgOut nname &" "&ccode
End Sub
现在想把nname与ccode这两个参数传给公式中:
<%
vspj=ccode
ffl.vardata("spj")=vspj
%>
vspj:spj;
c1:="vspj$close" -"if13$close";
o1:="vspj$open" -"if13$open";
h1:="vspj$high" -"if13$high";
l1:="vspj$low" - "if13$low";
kred:STICKLINE( c1>o1,c1 ,o1, 10,1 ,colorred);//空心实体
kred1:STICKLINE( c1>o1,max(h1,c1) ,max(c1,o1), 0,1 ,colorred);//上引线
kred2:STICKLINE( c1>o1,min(c1,o1) ,min(l1,o1), 0,1 ,colorred);//下引线
kgreen:STICKLINE( c1<=o1,c1 ,o1, 10,1 ),colorgreen;//实心实体
kgreen1:STICKLINE( c1<=o1,max(h1,o1) ,max(c1,o1), 0,1 ,colorgreen);
kgreen2:STICKLINE( c1<=o1,min(c1,o1) ,min(l1,c1), 0,1 ,colorgreen);
fc:=c1;
提示错误!
敬请老师指教!
Sub Technic_Paint()
Set Grid =Technic.GetGridByName("Main")
if Grid is NoThing Then
Exit Sub
End if
CALL Grid.DrawRect(18,25,120,48,RGB(255,255,0),2)
call Grid.DRAWTEXT(20,28,"执行外部分析程序",500)
framename=application.GetActiveFrameName
if framename<> "Technic" then
Application.ActivateFrame "Technic"
end if
nname=Grid.StockName
ccode=Grid.IndexCode
'传递数据到全局变量数据库
Document.SetExtString("TestName",nname )
Document.SetExtString("TestCode",ccode)
application.MsgOut nname &" "&ccode
End Sub
现在想把nname与ccode这两个参数传给公式中:
//公式读取全局变量数据库字符串
ccode:=EXTGBSTRING('testcode');
<%
vspj=FFL.StrVarData("ccode" ) '公式中字符串变量传递到VBS公式中
ffl.vardata("spj")=vspj
%>
vspj:spj;
c1:="vspj$close" -"if13$close";
o1:="vspj$open" -"if13$open";
h1:="vspj$high" -"if13$high";
l1:="vspj$low" - "if13$low";
kred:STICKLINE( c1>o1,c1 ,o1, 10,1 ,colorred);//空心实体
kred1:STICKLINE( c1>o1,max(h1,c1) ,max(c1,o1), 0,1 ,colorred);//上引线
kred2:STICKLINE( c1>o1,min(c1,o1) ,min(l1,o1), 0,1 ,colorred);//下引线
kgreen:STICKLINE( c1<=o1,c1 ,o1, 10,1 ),colorgreen;//实心实体
kgreen1:STICKLINE( c1<=o1,max(h1,o1) ,max(c1,o1), 0,1 ,colorgreen);
kgreen2:STICKLINE( c1<=o1,min(c1,o1) ,min(l1,c1), 0,1 ,colorgreen);
fc:=c1;
因该是你的代码问题了。
将你的全局变量数据库的写入部分代码贴过来看看