按键精灵的文件插件(File)
一、读写ini配置文件123Call plugin.file.WriteINI("补血配置","HP","80","C:\补血.ini")text=plugin.file
一、读写ini配置文件
1 2 3 | Call plugin.file.WriteINI("补血配置","HP","80","C:\补血.ini")text=plugin.file.ReadINI("补血配置","HP","C:\补血.ini")TracePrint text |
二、读写记事本
1 2 3 4 5 6 7 8 9 | Call plugin.file.WriteFileEx("C:\测试.txt","大家好")Call plugin.file.WriteFileEx("C:\测试.txt","我是信义之树")Call plugin.file.WriteFileEx("C:\测试.txt","欢迎来到我的网站")text=plugin.file.ReadFileEx("C:\测试.txt")TracePrint textMyArray=split(text,"|")For i = 0 To UBound(MyArray) - 1 TracePrint "第"&(i+1)&"行的内容为:"&MyArray(i)Next |
三、复制、重命名、移动、删除文件
1 2 3 4 | Call plugin.file.CopyFile("C:\测试.txt","C:\测试2.txt")Call plugin.file.ReNameFile("C:\测试.txt","C:\测试3.txt")Call plugin.file.DeleteFile("C:\测试2.txt")Call plugin.file.MoveFile("C:\测试3.txt","Y:\测试.txt") |
四、弹出选择文件/文件夹对话框
1 2 3 4 | path=plugin.file.SelectFile()TracePrint pathpath=plugin.file.SelectDirectory()TracePrint path |
五、办公文档插件(Office)
1 2 3 4 5 | Call plugin.office.OpenXls("C:\测试.xls")Call plugin.office.WriteXls(1,5,3,"信义之树")text=plugin.office.ReadXls(1,5,3)TracePrint textCall plugin.office.CloseXls() |


