键精灵编程怎么读取txt 然后再删除第一行接着读取第二行再删除第二行

2025-05-05 23:21:00
推荐回答(1个)
回答(1):

aText = Plugin.File.ReadFileEx("C:\1.txt")
MessageBox UBound(Split(aText, "|"))
    For UBound(Split(aText, "|"))-1//减去一次为了显示最后的效果
Text = Plugin.File.ReadFileEx("C:\1.txt")
MyArray = Split(Text, "|")
Call Plugin.File.DeleteFile("C:\1.txt")
If UBound(MyArray)>=0 Then
MessageBox  Cstr(MyArray(0))
    For i=1 to UBound(MyArray)-1
        Call Plugin.File.WriteFileEx("C:\1.txt", Cstr(MyArray(i)))
    Next
End If 
        Next
RunApp "C:\1.txt"