Text =Plugin.File.ReadFileEx("D:\VBA和BAT\135.txt")//读取文本
dim MyArray
MyArray = Split(Text, "|")//按行分割
If UBound(MyArray)>=0 Then
i = 0
For UBound(MyArray)
//下面这句是得到文本内容
Delay 100
MyArray2=split(MyArray(i)," ")//按空格分割
dest= MyArray2(0)//获取第一个参数
lang=MyArray2(1)//获取第二个参数
lauange=MyArray2(2)//获取第三个参数
MoveText dest,lang,lauange,18,519,224,867
Delay 100
i=i+1
Next
End If
Function MoveText(a, b , c,x,y,x1,y1)//声明函数体,模拟鼠标移动
MoveTo x,y
LeftClick 1
Delay 100
MoveTo x1,y1
LeftDoubleClick 1
SayString a
KeyPress "Enter", 1
Delay 500
MoveTo x1, y1+20
LeftDoubleClick 1
SayString b
KeyPress "Enter", 1
MoveTo x,y
LeftClick 1
Delay 100
KeyPress "F5", 5
Delay 100
MoveTo 1919,484
RightClick 2
Delay 1000
GetPic c,b
End Function
Function GetPic(language,row)//
Hwnd1 = Plugin.Window.Foreground()
TracePrint Hwnd1
KeyPress "F4", 1
GetPoint(Hwnd1)//模拟鼠标和键盘操作截图
TracePrint "if ok"
KeyDown 18, 1
KeyPress 115, 1
KeyUp 18, 1
RunApp "cmd /C cd d:\ && ren simulator* " & language & "_" & "230" & ".bmp && pause"
End Function
Function GetPoint(old)//根据当前窗口句柄id判断是否弹出了新窗口
While(Plugin.Window.Foreground()=old)
Delay 100
Wend
End Function