FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour WhatsAaa
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
WhatsAaa
Posted: Wed Nov 27, 2024 06:33 PM
Hila amigos.

No he podido mandar un mensaje por WhatsApp
FW2409 , Msv 2022
Los datos estan bien, Telef 598XXXXXXXX tambiern probé con +598...

Ven algún error?
Gracias
Code (fw): Select all Collapse
FUNCTION  WHATSAPP(cNombre, cTelef, elpass)  
          
          cTEXT := "Estimado/a cliente: "+ cNombre+"%0A"
          ctext1 :=  HBA("A partir de hoy podrá ver su resúmen de cuenta en ")+" "+"" + "%0A" 
          cText2 := HBA("Ud. deberá ingresar su nro. de cuenta y clave. %0A"+"En el campo fecha deberá ingresar una fecha cualquiera del mes que desea ver. %0A" )
          cText3 := "Su clave es "+"("+Alltrim(elpass)+")%0A" +  HBA("Los paréntesis NO son parte de la clave")+"%0A"
          cText4 :=  "%0A Le saluda atte. %0A"+" "+""
  
          ShellExecute( 0, "open", "whatsapp://send?phone="+cTelef+" &text="+cText+cText1+cText2+cText3+cText4 )
          SysWait( 8 )
          CreateObject( "WScript.Shell" ):SendKeys( "~" )
Saludos
Ruben Dario Fernandez
Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 410
Joined: Sun Jan 31, 2010 03:30 PM
Re: WhatsAaa
Posted: Thu Nov 28, 2024 12:33 AM
Code (fw): Select all Collapse
LOCAL oShell
   LOCAL nTimEsp := 2500   , cTimEsp := "2500"


   oShell := CreateObject( "WScript.Shell" )
                                          //https://web.whatsapp.com/
   try
     oShell:run("msedge.exe https://web.whatsapp.com/send?phone="+cNroTel )
   catch
     oShell:run("chrome.exe https://web.whatsapp.com/send?phone="+cNroTel )
   end

   Sleep(nTimEsp)
   oShell:sendkeys("{tab}{tab}")
   oShell:SendKeys("~")
   Sleep(5000)
   oShell:sendkeys(cTexMen)
   oShell:SendKeys("~")
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Re: WhatsAaa
Posted: Thu Nov 28, 2024 01:42 AM
Gracias compañero.

Pero me quedó funcionando con este código.
Code (fw): Select all Collapse
          cTelef:= cCelu
          cText := "Estimado/a cliente: "+ cNombre+"%0A"+"%0A"
          ctext1 :=  HBA("A partir de hoy podrá ver su resúmen de cuenta en ")+" "+cmen[3]+ "%0A" 
          cText2 := HBA("Ud. deberá ingresar su nro. de cuenta y clave. %0A"+"En el campo fecha deberá ingresar una fecha cualquiera del mes que desea ver. %0A" )
          cText3 := "Su clave es "+"("+Alltrim(elpass)+")%0A" +  HBA("Los paréntesis NO son parte de la clave")+"%0A"
          cText4 :=  "%0A Le saluda atte. %0A"+" "+""
          cText := cText+=ctext1+=ctext2+=ctext3+ctext4
          oShell := CreateObject( "WScript.Shell" )
         
          ShellExecute( 0, "Open", "whatsapp://send?phone="+cTelef+"&text="+cText+"%0A")

          Sleep(nTimEsp)
          oShell:SendKeys("~")  
          oShell:SendKeys("~")  
          CreateObject( "WScript.Shell" ):SendKeys( '~' )
Gracias russimicro
Saludos
Ruben Dario Fernandez.
Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 22
Joined: Thu Apr 23, 2020 12:41 PM
Re: WhatsAaa
Posted: Wed Jan 08, 2025 12:29 PM

Hi, is it possible to add an attachment to the message? Thanks.

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: WhatsAaa
Posted: Wed Jan 08, 2025 03:03 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion