"McKirahan" <News@McKirahan.com> wrote in message
news:uZmdnYS5NLYuMgjfRVn-2A@comcast.com...
> "News Group" <news.paradoxa@btopenworld.com> wrote in message
> news:utCBK1VYFHA.1796@TK2MSFTNGP15.phx.gbl...
> > Hi,
> >
> > Are there any examples (jscript or javascript) available which show how
to
> > dial a telephone no. from a web page?
> >
> > Thanks
> >
> > Colin
>
> Will this help? Watch for word-wrap.
>
> Here's a VBScript adapted from this link:
> '*
http://www.developerfusion.com/show/194/ > '* Use the MS Comm control to dial a telephone number.
>
> I only got it to run stand-alone; not from within a Web page.
>
> I tried to convert it to JavaScript but without success.
>
>
> Call Dial("18005551212")
>
> Sub Dial(Phone)
> Dim DialString
> DialString = "ATDT" + Phone + ";" + vbCr
> Dim FromModem
> Dim MSComm1
> Set MSComm1 = CreateObject("MSCommLib.MSComm")
> MSComm1.CommPort = 3
> MSComm1.Settings = "9600,N,8,1"
> On Error Resume Next
> MSComm1.PortOpen = True
> If Err Then
> MsgBox "COM" & MSComm1.CommPort & ": not available."
> Exit Sub
> End If
> MSComm1.InBufferCount = 0
> MSComm1.Output = DialString
> Do
> If MSComm1.InBufferCount Then
> FromModem = FromModem + MSComm1.Input
> '* Check for "OK".
> If InStr(FromModem, "OK") Then
> '* Notify the user to pick up the phone.
> MsgBox "Please pick up the phone and either press Enter or
> click OK"
> Exit Do
> End If
> End If
> Loop
> MSComm1.Output = "ATH" + vbCr
> MSComm1.PortOpen = False
> Set MSComm1 = Nothing
> End Sub
>