Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

procomm set modem connection

Status
Not open for further replies.

ramapoughnative

Technical User
May 6, 2003
2
US
Afternoon.
I'm trying to get procomm to check my pc for all serial modem connections. I can have up to 4 modems depending on the pc it will be running on. Is there a way for the scripts to dynamically check for all or will I have to manually program all? I have tried making a script using set modem connection then fetch the information. I get a runtime error if a connection doesn't have a modem installed. Any way to handle error without abending of scripts? Thanks!


 
Unfortunately, I'm not aware of another method for your script to get information about the installed modems that Procomm knows about, nor of a way to intercept and handle the error thrown by the script.

One possible workaround that I can think of if the scripts are not running unattended (or only need to be configured once), is to have a second script which just tries to set the modem connection, then writes the index or connection name to a text file which your main script can then access for information on the system. In ASPECT, actual modems start at index 11 (the help file's value is incorrect), so your script could start off with a command of set modem connection 11. If that call succeeds (in other words, the error message doesn't come up), then you open a text file, write either the index value or get the modem name using a fetch command, write that data to the text file, and close it. You would then increment the index by one and continue. When you got to the point where the error occurs, you can just close this helper script as the text file now contains all the modem information your main script needs.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top