Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP9 1

Status
Not open for further replies.

Kallol Dutta Gupta

Programmer
May 17, 2023
1
0
0
IN
Sir,

I have been sending text messages using Whatsapp from Vfp9. Of late the whatsapp window is opening but message is not being sent. Is there any issue with Whatsapp or what may be the problem. I have uploaded my program in the attachment field below.

Thanking you in advance.
Kallol

The code is as given below:

Declare Integer FindWindow In WIN32API String , String
Declare Integer SetForegroundWindow In WIN32API Integer
Declare Integer ShowWindow In WIN32API Integer , Integer
Declare Integer ShellExecute In shell32.Dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin

Local lt, lhwnd
cPhone=[918927791444]
ccMessage=[Test Message]
cmd='whatsapp://send?phone=&cPhone&text='+ccMessage
=ShellExecute(0, 'open', cmd,'', '', 1)
Wait "" Timeout 3
lt = "Whatsapp"
lhwnd = FindWindow (0, lt)
If lhwnd!= 0
SetForegroundWindow (lhwnd)
ShowWindow (lhwnd, 1)
ox = Createobject ( "Wscript.Shell" )
ox.sendKeys ( '{ENTER}' )
Else
Messagebox ( "Whatsapp is not activated!" )
Endif
 
 https://files.engineering.com/getfile.aspx?folder=82335609-c98a-46c7-b165-c80eafd90ccb&file=wap.PRG
Kallol,
You'll get more response if you post the specific question and code in the question.
I will NOT download code or files attached, as they are not pre-scanned by this site, and have previously been victim of ransomware posted this way.
Please ask you question specifically, and place the code in the posting using the "[ code ] and [ / code]" construct. (note take spaces out within the brackets to post your code.)



Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD

"I try to be nice, but sometimes my mouth doesn't cooperate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top