Sign in to follow this  
Followers 0
anixon

Modem (Com5)

1 post in this topic

#1 ·  Posted (edited)

How would you script a modem check (com3) where if the device has a property equal to 'This device is working properly' it returns 1 if true or 0 it false? Any test that proves that the modem is active and available would be ok including sending the modem a test and reading the response.

Help would be appreciated

Since posting this request for assistance I have got this to work:

$var = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM", "\Device\USBSER000")

IF $VAR <> "" THEN

$VAR1 = "YES"

Else

$VAR1 = "NO"

EndIf

MsgBox(0,"", $VAR1)

When the modem is plugged in the value returned is the name of the port COM3 which is the value returned by the RegRead. When the modem is not plugged in the data value is null.

Provided that the device name does not change this will give me the result.

Comments would be appreciated.

Cheers ;) Ant

Edited by anixon

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0