"COM port opened" check in the arduino code

I would like to ask if there is a possibility to check that external software on PC (vvvv, max etc) is opened port and started to send a data to arduino? I want to use it like mode selector between standalone operation and PC control. I'm using ft232rl versions of arduino's, so mb I can use some of handshaking pins to detect this event. Any sample code, ideas or HW tricks will be appreciated. Thx in advance.

I have a couple of "ideas".

The Arduino ONLY has the RX line to "sense" what is happing on the USB-PC connection. The CTS/DSR/etc other serial status pins only reside on the "USB-chip". So you would have to find out which pin onthe chip they are then carefully solder a wire to it and feed it to an Arduino pin. I can't remember offhand which controlsignal you want to look at.

Another approach is to wait for a few seconds(?) after start and if no data has been received on the RX line (Serial.available() remains at 0) assume stand alone operation.

Thanks Msquare,
It's not a problem to solder additional wire to ft232. The problem is to understand which one pin I need.
(Serial.available() remains at 0) I tried, but unsuccessfully. After checking the condition I jump to receiving the data and miss some bytes (that's ruined consistency of the data). I'm using a sort of Firmata protocol for sending data btw.

Look at the DTR line from the FT232. Normally it goes through a capacitor to give you the auto reset for programming when the line value changes. But if you wire it directly into an input pin you can look and see if it is connected.

You might check the status of the rts pin on the serial chip. I think it may normally be set high when the serial port is opened.