More details, please. Are we talking sales order, purchase order, or something else? Does the script copy something unexpected or does it fail completely?
One possibility - are you getting a pop-up warning you about the incompleteness, so that the status bar isn't active in that case? Perhaps you need to detect that and dismiss the pop-up before you can copy the status bar text?
Steve.