If you want to check the status of an input port, you can do that either of two ways. You said you used "outputopen" with no success. If you were using that to check the status of an input port, you're right, it doesn't work. That command is used to check the status of an output port.
You can use "inputopen(obj)", which will return a zero if the port has been closed using the closeinput() command. Or it will return a 1 if it is open (no red bar).
You can use "ipopen(obj)", which will check the status of a specific port number. But, this is the "internal" status of the port (no red bar). It will return a 1 if the specified port is open (green triangle) regardless of whether or not there is a red bar (closed by code). Or it will return zero if the internal status of the port is closed (red triangle).
I've attached a sample model where in the bottom portion of the screen are 4 Script tabs. If you select a tab and press the green > icon, it will execute the code shown. By executing these snippets of code, you can see how it affects the model and the return values on tabs 3 and 4.