This shows you the differences between two versions of the page.
— | sdk:scripts:send-sms [2015/05/05 15:04] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SDK Script send-sms.are ====== | ||
+ | <code c send-sms.are> | ||
+ | /* DESC: This script will send an SMS to the specified phone number. | ||
+ | * Copyright (C) 2012 NetModule AG, Switzerland | ||
+ | */ | ||
+ | |||
+ | void usage() | ||
+ | { | ||
+ | printf(" | ||
+ | exit(1); | ||
+ | } | ||
+ | |||
+ | if (argc < 3) { | ||
+ | usage(); | ||
+ | } | ||
+ | |||
+ | phone = argv[1]; | ||
+ | |||
+ | msg = ""; | ||
+ | for (i = 2; i <= argc; i++) { | ||
+ | msg = strcat(msg, " ", argv[i]); | ||
+ | } | ||
+ | |||
+ | id = nb_sms_send(phone, | ||
+ | if (id) { | ||
+ | printf(" | ||
+ | } else { | ||
+ | printf(" | ||
+ | } | ||
+ | |||
+ | exit(0); | ||
+ | |||
+ | </ | ||