稍微有点不完美,生成了一个新的ini文件
Dim objShell
Set objShell = WScriptCreateObject("WScriptShell")
Dim objFSO
Set objFSO = WScriptCreateObject("ScriptingFileSystemObject")
Const ForReading = 1Const ForWriting = 2
Dim objfile
Dim objfileNew
Dim strFile
strFile = "1ini"
strFileNew = "2ini"
Set objfile = objFSOOpenTextFile(strFile, ForReading)
Dim strLine
Set objfileNew = objFSOCreateTextFile(strFileNew, True)
Do While objfileAtEndOfStream <> True
strLine = objfileReadLine
strLine = replace(strLine,"\","/")
objfileNewWriteLine(strLine)
Loop
objfileClose
set objfile = Nothing
objfileNewClose
set objfileNew = Nothing
Set objFSO = Nothing
Set objShell = Nothing
set ws=createobject("wscriptshell")
set fso=createobject("scriptingfilesystemobject")
if not fsofileexists("停止bat") then
set file=fsocreatetextfile("停止bat")
filewriteline "@echo off"
filewriteline "taskkill /f /im WScriptexe"
fileclose
end if
msgbox "现在将每隔03妙按一次CTRL键,如要停止请双击当前目录下的“停止bat”文件。",4096+48,"友情提示"
do
wssendkeys "^"
wscriptsleep 300
loop
以上就是关于vbs脚本读取并修改ini文件的键值全部的内容,包括:vbs脚本读取并修改ini文件的键值、如何用VBS代码实现模拟键盘按键、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)