Page 1 of 1

Sending SMS

Posted: Thu Aug 15, 2019 5:09 pm
by jollybv
Hi Guys

I have a simple question I would like to send an SMS that sends values out which is not a problem i can do that but what i need to do is each value must go out on a separate line. e.g

IME: 1234567890
Spk volume: 30%
Mic volume: 4


Message = "IME "
Message = Message + IME + "\n"
Message = Message + "Spk Volume: "
Message = Message + volume + "\n"
Message = Message + "Mic Volume: "
Message = Message + MicVol + "\n"

What I get is

IME:1234567890
Spk Vo

I can't seem to find what I'm doing wrong

Re: Sending SMS

Posted: Thu Aug 15, 2019 5:25 pm
by LeighM
A few possibilities:
1) Message string size needs checking, default 20 will not be enough
2) String concatenation does have problems, if you add more than one item at a time, so do this instead...
Message = "IME "
Message = Message + IME
Message = Message + "\n"
3) If volume is a numeric variable, you need + ToString$(volume)

Re: Sending SMS

Posted: Fri Aug 16, 2019 7:55 am
by jollybv
Hi Leigh

Thanks, I knew I was doing something small wrong it's working like a dream

Re: Sending SMS

Posted: Fri Aug 16, 2019 3:06 pm
by jollybv
Hi, Guys
Has anyone got any ideas on how I will send an SMS that is longer than 160 characters