Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to read text in command prompt using QTP
#1
Not Solved Wink 
Hi,

I am trying to perform some operations using command prompt. I am able to write something on command prompt but unable to fetch the output text from the command prompt. I had tried with GetVisibleText property for a window but its giving just the title of that window instead to the body.
Please suggest any alternative to fetch text from window(Command Prompt).

Thanks.
Reply
#2
Not Solved
you may try this approach
Code:
Set screen = CreateObject("WScript.Shell").Exec("%COMSPEC% /c date /t")
Do While screen.Status = 0
  WScript.Sleep 100
Loop
WScript.Echo screen.StdOut.ReadAll
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to catch the script execution when QTP scripts are executed from command line Sreeni.lutukurthy 0 2,943 03-19-2015, 05:55 PM
Last Post: Sreeni.lutukurthy
  How to read a text file using FSO from bottom to up order?? vallalarasu.p 0 2,509 10-13-2014, 11:14 AM
Last Post: vallalarasu.p
  Read text from text file and save it into a variable in qtp arpan 3 12,974 06-19-2013, 08:34 PM
Last Post: arpan
  Clicking command button in accesss form mark_cielos24@yahoo.com 1 3,356 05-07-2013, 10:52 PM
Last Post: agarwl.anurag
  Need to compare two text files - ignoring some text nelly27281 2 4,584 09-09-2012, 12:09 PM
Last Post: freeboynil

Forum Jump:


Users browsing this thread: 1 Guest(s)