- Enrico Maria Giordano
- Posts: 9053
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 43 times
- Contact:
-
russimicro
- Posts: 413
- Joined: Sun Jan 31, 2010 3:30 pm
- Location: Bucaramanga - Colombia
- Been thanked: 5 times
Re: Whatsapp
App local .. como cualquier app nuestra para plataforma windows----
la otra opcion es como un servicio web
https://www.whatsapp.com/download?lang=es
la otra opcion es como un servicio web
https://www.whatsapp.com/download?lang=es
- Enrico Maria Giordano
- Posts: 9053
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 43 times
- Contact:
Re: Whatsapp
Hola, funciona muy bien. ¿Se puede enviar a un grupo de WhatsApp? Gracias.russimicro wrote: Sun Jun 29, 2025 11:52 am Buen día..
Este Código me funciona --- TOMADO DEL FORO
Code: Select all | Expand
// REQUIERE VERSION WhatsApp - Escritorio FUNCTION PRUEBA__WhatsApp() LOCAL cPhone := "57"+"325874510" // NO HACER PRUEBAS CON EL MISMO NUMERO DE QUIEN ENVIA LOCAL cMenEnv := "Anexo factura de venta en formato PDF" LOCAL cNomFil := "e:\temp\FACTURA_SP1012.PDF" enviaLinkWhatsApp(ALLTRIM(cPhone),cMenEnv,cNomFil) RETURN //*********************************************************** function enviaLinkWhatsApp(cPhone,cMsg,cFilPdf) LOCAL aImgEnv := {} IF !FILE(cFilPdf) ALERTA("Aviso. Archivo a transferir no existe : "+cFilPdf) ENDIF IF cFilPdf <> NIL .AND. !EMPTY(cFilPdf) aImgEnv := {cFilPdf} ENDIF IF !EMPTY(cPhone) _SendToWhatsApp( AllTrim( cPhone ), AllTrim( cMsg ), aImgEnv ) ELSE ALERTA("Aviso. Falto el n£mero para WhatSapp ") ENDIF return nil //**************************************************** function _SendToWhatsApp( cPhone, cMsg, aAttach ) local oShell local aFiles := {} local aOthers := {} if Empty( cPhone ); return .f.; endif DEFAULT cMsg := "Hello" if !Empty( aAttach ) if !HB_ISARRAY( aAttach ); aAttach := { aAttach }; endif AEval( aAttach, {|c| if( HB_ISSTRING( c ) .and. File( c ), ; AAdd( aFiles, c ), AAdd( aOthers, c ) ) } ) endif cMsg := StrTran( cMsg, CRLF, "%0D%0A" ) oShell := CreateObject( "WScript.Shell" ) ShellExecute( 0, "Open", "whatsapp://send?phone="+cPhone+"&text="+cMsg ) SysWait( 0.2 ) if !Empty( aFiles ) if FW_CopyToClipBoard( aFiles, 15 ) SysWait( 2 ); oShell:SendKeys( "^v" ); SysWait( 1 ) endif endif AEval( aOthers, <|u| if FW_CopyToClipBoard( u, 2 ) .or. FW_CopyToClipBoard( u ) SysWait( 1 ); oShell:SendKeys( "^v" ); SysWait( 1 ) endif return nil > ) SysWait( 1 ) oShell:SendKeys("~") return nil //********************************************
Re: Whatsapp
Hi, I tried using the program, but I could only send messages; attachments didn't arrive. No errors were reported; messages simply arrived without attachments. I'd also like to know if it's possible to automatically close the WhatsApp window that opens when you send a message. Thanks.