使用短信猫群发短信,代码如下;想改为每隔5分钟自动发送一次,每次发送10条短信,直到列表中所有短信发送对象都发送一次,代码如何改?
窗口事件TimerTick
For Each r As Row In Tables("短信群发表").Rows
If Not r.IsNull("发信日期时分") AndAlso r("是否发送") = True
AndAlso Date.Now >= r("发信日期时分") Then
e.Form.TimerEnabled = False
e.Form.Controls("btn_send").PerformClick()
Exit For
End If
Next
按钮事件:
For Each r As Row In Tables("短信群发表").Rows
If Not r.IsNull("发信日期时分") AndAlso Date.Now >= r("发信日期时
分") Then
Dim result As Integer
Try
result = FoxSMS.SendMsg(r("电话号码"),r("短信内容")) '发送信息
Catch ex As Exception
MessageBox.Show(ex.Tostring,"错
误",MessageBoxButtons.OK,MessageBoxIcon.Information)
End Try
r.Delete()
End If
Next
e.Form.TimerEnabled = True