04-28-2010, 12:52 PM
@Manish - I think the requirement in original query is bit different than the solution you provided for.
I think bostanma wants it from an opened Notepad and getting error for Window object. (May be this is what Bostanma wants to do here, lets confirm it) also in the code 'wscript' object has not been initiated anywhere, you can not use the code in QTP.
@Bostanma, - Manish has provided is an alternate way to read a text file, if this is not that what you are looking for, Please paste your lines of Code here, so that I can understand what actually you are trying to do.
I think bostanma wants it from an opened Notepad and getting error for Window object. (May be this is what Bostanma wants to do here, lets confirm it) also in the code 'wscript' object has not been initiated anywhere, you can not use the code in QTP.
@Bostanma, - Manish has provided is an alternate way to read a text file, if this is not that what you are looking for, Please paste your lines of Code here, so that I can understand what actually you are trying to do.