Welcome! Log In Create A New Profile

Advanced

Dial Phone number on Smartphone

Posted by Hans60 
Hans60
Dial Phone number on Smartphone
March 02, 2009 01:54PM
I am trying to dial a phone number on my smart phone. The phone number comes from a table. The word "PROCEDURE " remains however underlined what am I doing wrong?


// Selects the TAPI device
IF tapiLineDial(WIN_Settings.COMBO_TAPI[COMBO_TAPI ], ...
EditControlPhoneNumber,"TestLineStatus")<>0 THEN
Info("Click OK to hang up")
tapiHangUp()
END
PROCEDURE LineStatus(ValueLineStatus is int)
SWITCH ValueLineStatus
CASE tapiLineBusy: Message("The line is busy")
CASE tapiLineConnected: Message("OK, connected")
CASE tapiLineDialing: Message("Dialing in progress")
CASE tapiLineDialTone: Message("Dial tone")
CASE tapiLineDisconnected: Message ("The caller has hung up")
CASE tapiLineProceeding: Message("Searching for the correspondent")
CASE tapiLineRingBack: Message("Ringing")
END
David Martin
Re: Dial Phone number on Smartphone
March 02, 2009 04:03PM
Well, right off the top of my head I see that you are missing and END for the PROCEDURE.

// Selects the TAPI device 
IF tapiLineDial(WIN_Settings.COMBO_TAPI[COMBO_TAPI ], ...
  EditControlPhoneNumber,"TestLineStatus")<>0 THEN 
  Info("Click OK to hang up") 
  tapiHangUp() 
END // END for IF tapiLineDial
PROCEDURE  LineStatus(ValueLineStatus is int) 
  SWITCH ValueLineStatus 
  CASE tapiLineBusy: Message("The line is busy") 
  CASE tapiLineConnected: Message("OK, connected") 
  CASE tapiLineDialing: Message("Dialing in progress") 
  CASE tapiLineDialTone: Message("Dial tone") 
  CASE tapiLineDisconnected: Message ("The caller has hung up") 
  CASE tapiLineProceeding: Message("Searching for the correspondent") 
  CASE tapiLineRingBack: Message("Ringing") 
  END //-- END for SWITCH
END //--- END for PROCEDURE
Hans60
Re: Dial Phone number on Smartphone
March 02, 2009 05:43PM
hmm.. did not solve the problem

in the error code it says "PROCEDURE" is a WLanguage keyword, its use is incorrect in this case.
Thanks
Hans
Paulo Oliveira
Re: Dial Phone number on Smartphone
March 02, 2009 06:40PM
i don't know how it works with smart phones but you have one (WINDEV) mistake in your code.
In the tapiLineDial you are calling one procedure called TestLineStatus and in the procedure the name is LineStatus.

You can't copy the code from the help like it is, in fact PROCEDURE is a WLanguage keyword.
Use the first block of code for the tapiLineDial and define one GLOBAL/LOCAL PROCEDURE with the rigth name with all the code from the keyword procedure until the end.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: