怎么把引号放到引号里(vbs,sendkeys)

How do I put quotation marks into quotation mark (vbs, sendkeys)

我需要用 VBS 脚本在记事本中输入 "。

我有这个代码:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad"
wscript.sleep 500
WshShell.sendkeys "some "text""

但是显示错误。

你需要把里面的引号加倍或者你可以使用chr(34)

Text = "my ""example"" of doubled quotes"
Text = "use " & Chr(34) & "chr ()" & Chr(34) & " function"