oh wad i mean is when i send a format like (table for (2-8)-daniel) . my program will auto reply with a table no. to e customer via this format (Daniel your table no. 2 had been reserves. Table reservation will be void in 3 hours). if wrong format is send it will reply wrong format please send your sms in this format (table for (2-8)-(name)).
Hmmm. I wonder if I didn't have the modem driver installed when I installed vb? I didn't need it, so I waited for a few weeks. Otherwise the only other difference is that this is XP Media Center 2005 where it was XP Pro before.
EDIT: Just looked at an old backup. The same file is there. I might have installed it myself before also. Very strange indeed.
Last edited by dglienna; November 29th, 2007 at 08:48 PM.
Ok, Jason.
Your format table (2-8) meaning for 2 persons at 8 o'clock?
Well to get started I will send you later this day some cleaned up version of your program which we both can run to make things easier with finding errors, right?
So here it comes.
Please look at what I did. I put all port opening in Form_Load().
If you set the constant #Wof to 0 your settings are chosen. I can adapt by setting Wof to 1 when I have to try out stuff with my modem.
I have written a small routine GetModemResponse.
Look in Command1_Click() and Command2_Click() how it is used.
You might use it wherever an answer from the modem is waited for.
Only drawback is, my SMS terminal can send SMS, but cannot receive'm. So I can only simulate the receiving part here.
what i mean is when i send a even no. to this hp no. it will reply me with a table no. example- Daniel table for 4. then it will reply your table no() is being reserve. if wrong format is send it will reply with sorry wrong format inserted.
Yes? What's the problem?
You have managed to communicate with the modem.
I don't know how your modem works. Possibly you'd have to poll if an SMS has been received.
If so, you have already the routine to read the message. Just put it into a separate sub.
Then check the contents of the text for your desired syntax.
Are you having problems with string functions?
You wanted a format like: Name, #of persons
So you make an array, split up the message at the "," and analyse it
Code:
dim reply$()
reply = Split(LCase$(sms$, ","))
'now reply(0) would contain the name, reply(1) the number of persons
If UBound(reply)<1 Then 'wrong format, no comma
If val(reply(1)) =0 Then 'error number of persons not recognized
ok i am getting to understand this... sorry coz i am quite a newbie in this.
dim reply$()
reply = Split(LCase$(sms$, ","))
'now reply(0) would contain the name, reply(1) the number of persons
If UBound(reply)<1 Then 'wrong format, no comma
If val(reply(1)) =0 Then 'error number of persons not recognized
the code that u gave me.
i create a new timer and paste it in. Is it correct but it aint replying me at all.
so what muz i do to make it happen my deadline in almost
nez week i will be dead
Odd. I just installed VB6 a month ago, with SP6, and now I find I don't have mscomm32.ocx installed! Don't know what happened, but I found it in an old folder. You can download it with any vb6 app that uses a modem.
The SMS program has other problems. A module is likely missing.
Code:
Set SMS_Conn = New Shared_Connections
Set SMS_Server = SMS_Conn.GetHandle
Sorry Friends,
Just Remove those two lines
Code:
Set SMS_Conn = New Shared_Connections
Set SMS_Server = SMS_Conn.GetHandle
And the sample will work.
1. The sample displays all the messages received in a grid.
2. you can select a message on the grid and click read particular message
and i am sorry as it was a sample programme, I missed many details there
for example to send the SMS
Set the Caption of the TO Label with a mobile number to send
type the message and click send , There the SMS goes .
If you have a question then you should start a thread of your own rather than post in one that is several years old, also you should not post your email address in the public areas, unless of course you like to get spam.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.