Board logo

标题: [技术讨论] 最近在学vbscripts,贡献一段CRT代码 [打印本页]

作者: 小新好猥琐    时间: 2023-6-20 15:29     标题: 最近在学vbscripts,贡献一段CRT代码

哈哈哈,再也不用手动调整编码格式了~

1. 设置crt编码格式为GB18030
  1. # $language = "VBScript"
  2. # $interface = "1.0"
  3. crt.Screen.Synchronous = True
  4. Sub Main
  5.     Set SConfig = crt.GetScriptTab.Session.Config
  6.     SConfig.SetOption "Output Transformer Name", "GB18030"
  7.         SConfig.Save
  8. End Sub
复制代码
2. 设置crt编码格式为UTF-8
  1. # $language = "VBScript"
  2. # $interface = "1.0"
  3. crt.Screen.Synchronous = True
  4. Sub Main
  5.     Set SConfig = crt.GetScriptTab.Session.Config
  6.     SConfig.SetOption "Output Transformer Name", "UTF-8"
  7. SConfig.Save
  8. End Sub
复制代码





欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2