发新话题
打印

机器人发工资条(VB)(借用晚风轻诉代码)

机器人发工资条(VB)(借用晚风轻诉代码)

Public i As Integer
Dim mag As String

Private Sub Form_Load()
Shell "136000000000.bat"  '运行机器人服务器
i = 0
End Sub

Private Sub Command3_Click()
Open "工资发放花名总表.txt" For Input As #1
Do Until EOF(1)
   Line Input #1, meg
   'Text1.Text = Text1.Text + "sms " & meg + Chr(13) + Chr(10)
WriteCMD ("sms " & meg + Chr(13) + Chr(10))
Loop
End Sub

Private Sub WriteCMD(CmdStr As String)
Dim filename As String
filename = "commands\1360000000_" & CStr(Format(i, "000000")) & ".cmd"
content = CmdStr
'If Dir(filename) <> "" Then Kill filename
Dim obj As Object
      Set obj = CreateObject("adodb.stream")
      With obj
        .Open
        .Charset = "UTF-8"
        .Position = .Size
        .WriteText content, 1
        .SaveToFile filename
        .Close
      End With
    i = i + 1
End Sub

不知道为什么,这个command方法比原来的SOCKET发的慢多了,唉,老大能告诉一下吗?

TOP

你用COMMAND方法发一条看看时间吧,估计慢是飞信那边的问题。。。本地程序的处理很少。。。

TOP

发新话题