Tommyboy Posted June 21, 2007 Report Posted June 21, 2007 Hi everyone, I'm a newbie on this site. I am trying to create a macro at work that compares two separate text files. It counts the occurence of each word that appears in both files more than once. Then it dispays the occurence of each word in both text files. The text from both files is completely random text. If you need any more info please ask, Tom Quote
Cory Posted June 26, 2007 Report Posted June 26, 2007 That sounds like a fun project and it could all be done on the programming side of ME. But what’s your question? Quote
Tommyboy Posted June 29, 2007 Author Report Posted June 29, 2007 HI CORY, What i would like the macro to do is: 1. Open notepad1.txt 2. Locate all occurences of "Feedback" in each line of text in notepad1.txt 3. counter 1. Open notepad2.txt 2. Locate all occurences of "Feedback" in each line of text in notepad2.txt 3. counter 4. Then (If variable %T6% contains variable %T2%, display text box) (It should display in the the text box the lines in notepad1 which also appear in notepad2 ) The code below is how far i got, but kinda got stuck on it. <BTFBEG:001:000060:000000:\\dub-efs-01\home\tshanahan\Desktop\notepad1.txt><DELAY:.2><TMVAR2:05:01:01:000:000:><NMVAR:05:01:0:0000002:0:0000000><IFVAR2:1:01:7:TFeedback><IVAR2:03:01:0><NMVAR:08:04:0:0000001:0:0000000><TBOX4:T:1:000974000392000278000200:000:notepad1%T1% Line: %N4%><ENDIF><BTFEND><DELAY:.2><BTFBEG:005:000060:000000:\\dub-efs-01\home\tshanahan\Desktop\notepad2.txt><DELAY:.2><TMVAR2:05:05:05:000:000:><NMVAR:05:05:0:0000006:0:0000000><IFVAR2:1:05:7:TFeedback><IVAR2:07:01:0><NMVAR:08:08:0:0000001:0:0000000><IFVAR2:4:06:7:T2T><TBOX4:T:1:CenterCenter000278000200:000:Similar Feedback Found%T2% %T6% ><ENDIF><TBOX4:T:1:000986000393000278000200:000:notepad2%T5% Line: %N8%><ENDIF><BTFEND> Quote
Cory Posted July 3, 2007 Report Posted July 3, 2007 First off I would not open the files. I would load them into text vars. Then do a repetitive loop to find and replace all occurrences one at a time so that you can count them. We had a recent thread on this if you dig around a bit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.