Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send messages to whatsapp from VFP
Message
De
09/04/2020 18:02:55
 
 
À
09/04/2020 12:51:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01674024
Message ID:
01674026
Vues:
94
>hello, how are you, here is the code I use to send messages from my application via WhatsApp, it works perfect for sending text, but I have not been able to automatically attach a file, any suggestion to do so, thanks
>
>Here is my code:
>
>local lt, lhwnd
>lt = "Whatsapp"
>ox = createobject ( "Wscript.Shell" )
>wait "" timeout 3
>smensaje=strtran(alltrim(xsmensaje)," ", "%20")
>stelefono=strtran(alltrim(xstelefono),"-", "")
>comando="whatsapp://send?phone=1"+alltrim(stelefono)+"&text=%0A"+alltrim(smensaje)
>if ximagen
>	=shellexecute(0, "open", comando,"", "", 1)

Jose,
I am afraid you cannot 'automate' for one thing Whatsapp on your pc only works with a Phone aside. How do you want to check that situation?
Regards,
Koen
>else
>	=shellexecute(0, "open", comando,"", "C:\PROYECTO", 1)
>endif
>lhwnd = findwindow (0, lt)
>if lhwnd!= 0 && Comprueba si la ventana está activada
>	setforegroundwindow (lhwnd) && Establece el foco en la ventana de la aplicación donde Tú envías la llave.
>	showwindow (lhwnd, 1)
>	ox.sendkeys ( "{ENTER}" )
>else
>	messagebox(" espere un momento por favor!!!!!!!",0,'AVISO',10000)
>	ox.sendkeys ( "{ENTER}" )
>	if ximagen
>		ox.sendkeys ("^(V)")
>	endif
>	ox.sendkeys ("%{F4}")
>endif
>ox.sendkeys ("{ENTER}")
>
>ox.sendkeys ("%{F4}")
>return 1
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform