循环遍历分辨率常规写法(约用时50秒):![](/images/attachicons/attachimg.gif)
循环遍历分辨率VBScript块写法(用时191毫秒):![](/images/attachicons/attachimg.gif)
代码及注释:- Import "GetSysInfo.dll"'VBSBegin块内不支持Plugin 本写法也将加快命令的调用
- VBSBegin'VBSBegin块必须放置于开头 不能放于Call之后
- Sub FBL()'VBSBegin块内不支持中文命名
- T1 = GetSysInfo.GetTime()'插件忽略Plugin的写法
- TracePrint T1
- k=GetSysInfo.GetScreenResolutionX()
- g=GetSysInfo.GetScreenResolutionY()
- For i = 1 To k'循环分辨率宽
- For j=1 to g'循环分辨率高
- Next
- Next
- TracePrint GetSysInfo.GetTime -T1'输出用时差
- End Sub
- VBSEnd
- Call FBL()'调用VBSBegin块
复制代码- '例子1
- Execute "MoveTo 100,100"
- Execute "LeftClick 1"
复制代码- '例子2
- txt = "1,2,3"
- Execute "Var1=Array("&txt&")"
- TracePrint Var1(2)
复制代码- i = 5
- j = 3
- Execute("A" & i & "=" & j)
- TracePrint eval("A" & i)
复制代码 VBScript块+Execute+EvalVBSBegin
Sub YuZhouChaoJiWuDiChaoRenAoTuMan()
MsgBox "子程序被调用了"
End Sub
VBSEnd
变量 = "宇宙超级无敌超人凹凸曼"
Execute Lib.算法.中文汉字转拼音(变量)
返回值 = Lib.算法.中文汉字转拼音("定位傲来国坐标")
TracePrint 返回值
a="傲来国"
b=188
c = 55
VBSBegin
Sub DingWeiAoLaiGuoZuoBiao(Var1,Var2)'等于Sub 定位傲来国坐标(定位傲来国坐标必须转拼音 VB块Sub不支持中文)
TracePrint Var1&","&Var2
End Sub
'其他Sub
VBSEnd
Execute Lib.算法.中文汉字转拼音("定位"&a&"坐标")&" "&b&","&c
VBSBegin
Function [宇宙超级无敌超人凹凸曼] ()
[宇宙超级无敌超人凹凸曼]="1"
End Function
TracePrint [宇宙超级无敌超人凹凸曼]
VBSEnd