PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD17] Sending a sms via pc
[WD17] Sending a sms via pc
Iniciado por guest, 28,feb. 2015 12:04 - 3 respuestas
Publicado el 28,febrero 2015 - 12:04
Hello to all

Following the example published in the www.clickatell.com site (from Vb section example languages),
i'm trying to do the same with Windev to send a sms from an application.

I receive an error when it try to execute :

pautXMLHTTP>>Send (sPostdata)

The error is show in the picture below:


Here is the code i'm using for the test:

sUrl is string sAPI_Id is string sPassword is string sUsername is string sMobileNo is string sText is string sMyServer is string="Microsoft.XMLHTTP" sPostData is string sResult is string pautOXMLHttp is dynamic Automation object pautOXMLHttp= new Automation sMyServer sUrl="<a class="ExternalLink" rel="nofollow" target="_blank" href="http://api.clickatell.com/http/sendmsg">http://api.clickatell.com/http/sendmsg</a>" sAPI_Id=EDT_ApiID sPassword=EDT_Password sUsername=EDT_Username sText=EDT_Testo sMobileNo=EDT_Cellulare sPostData="api_id="+sAPI_Id sPostData+="&user="+sUsername sPostData+="&password="+sPassword sPostData+="&to="+sMobileNo sPostData+="&test="+sText pautOXMLHttp>>Open ("POST", sUrl,False) pautOXMLHttp>>SetRequestHeader ("Content-type", "application/x--www-form-urlencoded") pautOXMLHttp>>Send (sPostData) sResult=pautOXMLHttp>>responseText EDT_Risultato=sResult

What i'm wrong???

Thanks in advance
Gianni
Publicado el 28,febrero 2015 - 20:22
Hi

I use a company called packet media, no ActiveX required its one line of code.

ISO
Publicado el 28,febrero 2015 - 20:34
Hi Gianno,

It's much simpler if you use a httprequest using the GET method.

Quote
Clickatell site
Open your browser (e.g. Internet Explorer), and type in your info in the address bar in the following sequence: <a class="ExternalLink" rel="nofollow" target="_blank" href="http://api.clickatell.com/http/sendmsg?user=xxxxx&password=xxxxx&api_id=xxxxx&to=448311234567">http://api.clickatell.com/http/sendmsg&hellip;</a> &text=Meet+me+at+home

Step 5

The text of your message must be formatted so that '+' signs replace spaces between words as above.

Regards,
Piet
Publicado el 01,marzo 2015 - 15:29
Thanks to all for the suggestions.

Gianni