为了让脚本里的变量有一个统一的地方进行修改,我在global.sbh里设置如下:
'SQABasic Header File
global const FirstNO as integer = 1
global const LastNO as integer = 10
然后设置了几个脚本。
P1是总脚本,调用P2,P3两个脚本,P2,P3都要调用P4。
P1:
Sub Main
CallScript "P2"
CallScript "P3"
End Sub
P2:
'$include: "global.sbh"
Sub Main
dim x as integer
CallScript "P4"
For x=FirstNO to LastNO
.............
.............
Next x
End Sub
P3: 与P2类似
P4:则是登陆系统之类的基本操作