George -

Please put your code in [ code ] tags!

You don't say why it isn't working or what error you're getting.

My earlier example depends on the Ping UDF from my site, which uses positive logic. Many of the other UDFs use negative logic, which will require additional coding to make it work. Not sure of the UDF you're using as it's quite old and has external dependencies, but you should verify that it returns with non-zero values on success.

Positive logic returns a TRUE state with an error code of zero on success, or a FALSE state and a non-zero error code on failure. This allows simple
 Code:
If Function()
  ; do stuff
Else
  ; choke - gasp! FAILED! Check error code!
EndIf
logic to be employed. Negative logic returns FALSE (zero) with an error code of zero on success and a TRUE with a non-zero error code on failure. This requires logic similar to this:
 Code:
If Function() = 0 ; or - If NOT Function(), which is counter-intuitive
  ; success - do stuff
Else
  ; choke - gasp! FAILED! Check error code!
EndIf
Glenn
_________________________
Actually I am a Rocket Scientist! \:D