如何在使用某些字节数据后循环 [英] how to loop after using certain bytes of data

查看:64
本文介绍了如何在使用某些字节数据后循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个程序,通过gsm调制解调器发送自动短信,然后连接到互联网。我已经能够让程序使用计时器以时间间隔发送短信。现在我希望程序在浏览时发送短信并使用某些字节的数据。我想选择用于自动化程序的时间间隔或数据字节。



这是我的代码:



Private Sub Form1_Load(发件人作为对象,e作为EventArgs)处理MyBase.Load

'获取端口

For Each items As String In SerialPort.GetPortNames

cboPort.Items.Add(items)

Next



End Sub



Private Sub RunBtn_Click(发送者作为对象,e作为EventArgs)处理AutoStartBtn.Click,Timer1.Tick

如果PhoneNumberTextBox.Text =那么

MsgBox(电话号码或时间间隔为空)

否则

Process.Start(rasdial,MTN / DISCONNECT)

SendFirstMsg(发件人,e)

Thread.Sleep(3000)

Process.Start(rasdial,MTN)

Timer1_Tick (发件人,e)

Cancelbtn.Enabled = True

BytesReceivedLabel.Visible = True

Bytesenlabel.Visible = True

ModemLabel1.Visible = True

TotalDataLabel.Visible = True

InternerConnectLabel.Text =已连接!



结束如果

< br $> b $ b





结束次级

请一些人帮我。我希望字节使用自动化

I am writing a program that sends automatic sms through gsm modem then connects to the internet. I have been able to make the program send sms at time interval using timer. Now I want the program to send sms while I am browsing and used a certain bytes of data. I want to choose time interval or bytes of data used to automate the program.

Here is my code:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'get the ports
For Each items As String In SerialPort.GetPortNames
cboPort.Items.Add(items)
Next

End Sub

Private Sub RunBtn_Click(sender As Object, e As EventArgs) Handles AutoStartBtn.Click, Timer1.Tick
If PhoneNumberTextBox.Text = "" Then
MsgBox("phone number or Timeinterval is empty ")
Else
Process.Start("rasdial", "MTN /DISCONNECT")
SendFirstMsg(sender, e)
Thread.Sleep(3000)
Process.Start("rasdial", "MTN")
Timer1_Tick(sender, e)
Cancelbtn.Enabled = True
BytesReceivedLabel.Visible = True
Bytesenlabel.Visible = True
ModemLabel1.Visible = True
TotalDataLabel.Visible = True
InternerConnectLabel.Text = "connected!"

End If




End Sub
Please some body help me. I want the bytes used automation

推荐答案

这篇关于如何在使用某些字节数据后循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆