按键精灵读取文本,并按行输入

2024-11-04 07:55:08
推荐回答(2个)
回答1:

txt = Plugin.File.ReadFileEx("C:\log.txt")
txt = split(txt, "|")
a=1
For Each val In txt
If a > 2 Then
a = 1
Call xuanze()
End If
SayString val
KeyPress 13, 1
a = a + 1
Delay 1000
Next
sub xuanze()
XZ = MsgBox("请选择是否向下进行",1,"选择")
If XZ = 2 Then
EndScript
End If
End Sub
EndScript
================================================
sub xuanze()是用来判断是否继续输入的,选是继续,选否退出

回答2:

txt = Plugin.File.ReadFileEx("C:\log.txt")
txt = split(txt, "|")
For Each val In txt
If a > 2 Then
a = 1
KeyPress 13, 1
End If
SayString val
a = a + 1
Delay 3000
Next