ConnectTo
(This function has been made obsolete by functions contained in the AutoMate™ System Object . It is provided only for compatibility with previous versions of AutoMate™.)
Function : ConnectTo
ConnectTo will return a string value depending on whether the internet connection succeeded or failed in the amount of time given.
Syntax:
Result$ = ConnectTo(Providers Name, {Seconds to Wait Before Timing Out})
Results:
Connected : Internet Connection Succeeded
Failed : Internet Connection did not succeed in the amount of time given.
Example:
Sub Main
result = ConnectTo("The Loop", 45) ' Enter your Internet Providers name in the "The Loop" area and then the amount of time in seconds that you want to give the connection before it times out automatically (usually at least 45)
If result = "Connected" Then ' Check to see whether we are connected
MsgBox("Connected") ' Yes (you can add your own events here)
Else
MsgBox("Failed to Connect") ' No (you can add your own events here - maybe try again?)
End If
End Sub
Notes: The Internet provider's name should be entered exactly as it appears in your Dial-Up Networking Folder. It is not case sensitive. If you are already connected to the Internet, Connected will immediately be returned. If you are already connected to the Internet and your connection was established with a program other than AutoMate™, the function may erroneously report Failed, thus it is a good idea to connect directly to the Internet with AutoMate™ if a decision is to be made dependent on the results of this function.
Related Topics: