by Anonymous (267 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Initialise a modem using VBScript. Use it to control a modem, a weight indicator or any other device that is connected to a computer by a
' You need the freeware AComport.dll to run the sample.
' Download it from http://www.vahland.com/pub/acomport.dll
' and register it on your machine.
' Read http://www.vahland.com/pub/acomport.htm for more info
Const acERR_SUCCESS = 0
' --------------------------------------------------------------
Sub WriteStr( o, str )
o.WriteString str
WScript.Echo "-> " & str
End Sub
' --------------------------------------------------------------
Sub ReadStr( o )
str = "notempty"
Do While str <> ""
str = o.ReadString
WScript.Echo "<- " & str
Loop
End Sub
' --------------------------------------------------------------
WScript.Echo "Be sure to have the FREEWARE AComport.dll registered on your system"
WScript.Echo "Check out the code header about how to obtain the component."
Set acObj = CreateObject( "ActivXperts.Comport" )
acObj.Baudrate = 19200
acObj.PortID = 1
acObj.Open
WScript.Echo "acObj.Open, result: " & acObj.LastError
If acObj.LastError = acERR_SUCCESS Then
WriteStr acObj, "atz"
ReadStr acObj
WriteStr acObj, "at&f"
ReadStr acObj
End If
No comments have been posted about Initialise a modem using VBScript. Use it to control a modem, a weight indicator or any other devic. Why not be the first to post a comment about Initialise a modem using VBScript. Use it to control a modem, a weight indicator or any other devic.