【发布时间】:2014-11-26 08:11:51
【问题描述】:
我使用以下 lua 代码创建了一些文件并在 game.txt 中添加了一些文本
function makeFiles()
os.execute( "mkdir season\\week1" )
newFile = io.open( "season\\week1\\game.txt", "a+" )
newFile:write('123')
newFile:close()
end
makeFiles()
cmd 告诉我类似:“season\week1”已经存在(从德语翻译)。我正在寻找一种通过 lua 禁用 CMD 输出的方法。运行我的脚本后,CMD 中不应该有输出告诉我消息,我需要以静默方式运行代码,用户不应该看到这个。我问是因为我需要通常使用 lua 停用 cmd 的输出。
【问题讨论】: