Kallol Dutta Gupta
Programmer
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
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