|
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=31"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=79"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=116"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=168"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=223"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=278"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=330"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=370"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=421"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=486"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=544"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=614"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=660"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=715"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=767"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=815"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=880"
'ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=901"
上边是录制的一个移动滚动条的简单脚本,但这这样太长了,我想通过循环来实现这个功能。
按照简单的想法我改写成:
dim Count as integer,pll as integer
for Count=0 to 18
pll=50*count
ScrollBar VScrollTo, "Type=Control;Name=byLogCtrl1;\;Type=ScrollBar;Index=0", "Position=pll"
next count
但是发现滚动条没有动。
我是一个初学者,完全不懂是怎么回事,是不是 因为变量pll在双引号中,所以没有被当做变量处理? |
|