Using the %newport Variable

Top  Previous  Next

 

The %newport variable is initialized when the MODEMDETECT script command has executed successfully.

 

The variable is set to either the first COM (e.g., COM1 to COM48) where a modem was detected; the first COM port detected in the system if no modem is detected and the /firstportok option is specified; or a null string if no COM ports are detected or if no modem is detected and the /firstportok option is not specifed.

 

The following example shows how to set FileLink to use a COM port where a modem has been detected.

 

MODEMDETECT

IFERROR $ERROR_NO_MODEMS_DETECTED goto no_modems

USEPORT %newport