02-12-2016 01:56 AM
Am a new bee in QTP automation script. I have two text files. One (Check.txt) is with fault code and description and another is (Ex.txt) with so many details along with fault code and fault snap shot. I need to compare both file that frst file fault code and description is available in second or not. Kindly suggest any code . Can perform this with array comparison ?
Solved! Go to Solution.
02-16-2016 12:30 AM
Hey,
Overall, with regards to QTP Automation, I do not think we have a direct way in LabVIEW to run these scripts. There is some discussion beginning to happen on this forum on how to use other methods (command line execution, activex etc) for this - http://forums.ni.com/t5/LabVIEW/how-to-call-QTP-scripts-using-labview/td-p/1245804
As for your question, the text files are really huge. You could use the "Read Text File" VI to read chunks of the text file and make a custom parser which scans beginning of each line and classifies it as error code and the remainder as the description. You will then have to match this with the description in the other text file, which will go through a similar parser.
-Suraj Pawar
Applications Engineer
NI
02-16-2016 12:53 AM
Hi,
You could also have a look at this community example, which is a text file parser. It reads the entire text file and returns every sentence as array of strings. You could then use further array maniuplation functions in labVIEW to scan the strings.
-Suraj Pawar
Applications Engineer, NI
02-16-2016 12:58 AM
Hey,
Forgot to link the example in my previous post. Here it is -> https://decibel.ni.com/content/docs/DOC-10662
-Suraj Pawar
AE, NI
02-16-2016 01:01 AM
Thanx a lot for ur valuable suggestion .