If Statement to check remote connections established or not

How to use If statement in EggPlant to check a connection is enabled or not.

For Example:
Check if ‘XXXX’ connection is enabled.
If connect "XXX’ enabled
RunWithNewResults "ScritpName’
Connect "XXXX’
RunWithNewResults “ScriptName”
end if

You will want to use either the ConnectionInfo() or AllConnectionInfo() function.

You can read all about those on the eggPlant Command and Functions page.

Sorry for asking this, just had a look from Google - found useful tips.
Thanks Jonathan.