如果要么全是英文要么全是中文,可以用下面这个vbs- s1 = "12345678"
- s2 = "一二三四五六七八"
-
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- Set oWshShell = CreateObject("WScript.Shell")
- s = oWshShell.ExpandEnvironmentStrings("%windir%\System32\CScript.exe")
- If LCase(WScript.FullName) <> LCase(s) Then
- s = s & " /nologo """ & WScript.ScriptFullName & """ "
- For Each i In WScript.Arguments
- If InStr(i, " ") > 0 Then i = """" & i & """"
- s = s & i & " "
- Next
- oWshShell.Run "cmd.exe /k " & Left(s, Len(s) - 1)
- WScript.Quit()
- End If
-
- Wsh.Echo t(s1)
- Wsh.Echo t(s2)
-
- Function t(ByVal s)
- t = Left(s, 2)
- If Asc(s) < 127 Then t = Left(s, 4)
- End Function
复制代码
|