xynetclienttest.vbs
来自「一个打包好的.NET环境下的TCP插口组件」· VBS 代码 · 共 21 行
VBS
21 行
dim doc
set doc = CreateObject("XYNetComClient.1")
doc.SetReadTimeout 10
if doc.Connect("Lobster", 3000) = 0 then
wscript.echo doc.GetLastError
wscript.echo doc.GetLastErrorCode
wscript.quit
end if
if doc.ReceiveData(10000000, false) then
wscript.echo doc.GetStringData
else
wscript.echo doc.GetLastError
end if
doc.SendStringData "Hello, world. This is a test. It is only a test. If it were not, you will hear some screaming coming from all directions."
if doc.ReceiveData(10000000, false) then
wscript.echo doc.GetStringData
else
wscript.echo doc.GetLastError
end if
'doc.Reset
set doc = nothing
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?