Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
12.10.2016, 17:56
(This post was last modified: 12.10.2016, 18:21 by Erwin van der Zwart.)
Hi,
I don't think this data is available on the SIM itself.
Normaly you send sms to provider and you reveive the
value back by SMS.
It is possible to receive this reply sms and gsub the data from the received string.
You have to check out what string you need to send to , and what number to use for, your provider to receive the reply.
If you know those 2 items it's easy to create your wish.
BR,
Erwin
Sorry, i see now that you already receive the SMS with the reply.
You can fetch the saldo from the received string by using:
amount = receiveddata:match("stringbeforedatapart(.-)stringafterdatapart")
BR,
Erwin
Posts: 215
Threads: 65
Joined: Sep 2015
Reputation:
0
you can specify how to do it?
in SmsHander, I need to add this code somewhere. and what to do next.
I'm new employees, should also have little trouble.
thank you very much!
--------
amount = receiveddata:match("stringbeforedatapart(.-)stringafterdatapart")
--------
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
The pop-up is simple, just use inside the handler code i posted the
command alert('current sim value is: ' .. amount)
The other question is harder, as you want to dail a number to request
the reply SMS. i never tried that before, maybe admin has script for that.
I would check if you can send SMS to request the value reply, if your provider support that
then you can use current sms script to send the request.
BR,
Erwin
Posts: 215
Threads: 65
Joined: Sep 2015
Reputation:
0
06.08.2017, 11:17
(This post was last modified: 06.08.2017, 11:19 by phongvucba.)
Please help me! I have some problems.
I see ! When a message arrives (as shown below)
I want to retrieve the message sequence, what should I do?
The purpose is to take that string, to control something (control the lights by SMS).
Can someone help me?
Thank all!