vbs 实现单按钮控制
14.155.223.232
发布于2012-11-28 21:02
3
0
标签:
vbs实现单按钮控制,控制变量m1如
按下,置位;再按下复位;
如何编写程序?
问题补充:
dima
dimb
dimc
c=msgbox("确定要超差确认吗",vbyesno+vbexclamation+vbdefaultbutton2,"提示信息")
ifc=vbyesthen
seta=hmiruntime.tags("a_touyt_shoudong_b")
a.read
msgbox("1")
ifa=0then
a.write1
a.read
msgbox("2")
else
a.write0
a.read
msgbox("3")
endif
msgbox("4")
endif
msgbox("5")
endsub
///现在情况只执行到msgbox("1")
佳答案
楼上的都没有看就来了!vbs是上位机做的。wincc的按钮的vbs中:
dimmytag
mytag=hmiruntime.tags("tag").read
ifmytag=1then
hmiruntime.tags("tag").write0
elsehmiruntime.tags("tag").write0
endif