如果内容中有“”,如何使用 Send()? (自动)
How use Send() if the content has "" in it ? (autoIt)
Run("cmd.exe")
Global $String = "wmic process where name="example.exe" get commandline"
Send($String)
结果:
Global $String = "wmic process where name="example.exe" get commandline"
Global $String = "wmic process where name="^ ERROR
您只需使用单引号将您的字符串括起来。
$string = 'test "example" and more stuff'
或者您可以 "escape" 将双引号加倍,如 AutoIt 中数据类型 Strings description 中所述。
$string = "test ""example"" and more stuff"
Run("cmd.exe")
Global $String = "wmic process where name="example.exe" get commandline"
Send($String)
结果:
Global $String = "wmic process where name="example.exe" get commandline"
Global $String = "wmic process where name="^ ERROR
您只需使用单引号将您的字符串括起来。
$string = 'test "example" and more stuff'
或者您可以 "escape" 将双引号加倍,如 AutoIt 中数据类型 Strings description 中所述。
$string = "test ""example"" and more stuff"