Text =Plugin.File.ReadFileEx("D:\VBA和BAT\135.txt")//读取文本
dim MyArray
MyArray = Split(Text, "|")//按行分割
If UBound(MyArray)>=0 Then
i = 0
For UBound(MyArray)
//下面这句是得到文本内容
'SayString Cstr(MyArray(i))
Delay 100
MyArray2=split(MyArray(i)," ")//按空格分割
'Msgbox "成功输入第 " & i+1 &" 行文本内容为:"& Cstr(MyArray(i) & "第一个字符:"& MyArray2(0) & "第二个字符:"& MyArray2(1))
dest= MyArray2(0)//获取第一个参数
lang=MyArray2(1)//获取第二个参数
lauange=MyArray2(2)//获取第三个参数
'MsgBox lauange
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)//模拟鼠标和键盘操作截图
'If Hwnd2 <> Hwnd1 Then
TracePrint "if ok"
KeyDown 18, 1
KeyPress 115, 1
KeyUp 18, 1
'RunApp "D:\1.bat"
RunApp "cmd /C cd d:\ && ren simulator* " & language & "_" & "230" & ".bmp && pause"
'End If
End Function
Function GetPoint(old)//根据当前窗口句柄id判断是否弹出了新窗口
While(Plugin.Window.Foreground()=old)
Delay 100
Wend
End Function
按键精灵多语言自动截图
最新推荐文章于 2024-06-17 07:21:51 发布