proc main set modem connection "connection_name" ;Connection_name should be replaced by the name of your connection commandmode on if success commandmode off ;Turn command mode off so TAPI can access the modem ;Modem is accessible, continue with script execution else ;Modem is inaccessible, display error message endif endproc