Post by Rambo-X on Feb 24, 2021 8:32:23 GMT
Hello Everyone,
This was given to me by Steve related to a previous Question.
1 | FOR | EACH | FILE IN | D:\Macro\macro_folder | DO
2 | FOR | EACH | LINE IN | %FILE% | RUN
3 | FOR | NEXT
This helps me to run a set of mmmacro files one after the other from a specific folder.
But now I have stumbled upon a more complex scenario.
Let me explain what I Have, what I Run and what I need your help on.
What I Have :
Folder 01. Individual email addresses ( txt files - multiple )
Folder 02. A set up change ( mmmacro files - multiple )
Folder 03. The Set up ( only 02 mmmacro files : before and after files )
What I Run :
I have a Macro which runs in below sequence.
Line 01. Mmmacro file ( from Folder 03. ) -
runs what happens before we enter email. ( some clicks to get things in place )
Line 02. Mmmacro file ( from Folder 03. ) -
to pick the email from Folder 01. And paste it.
Line 03. Mmmacro file ( from Folder 03. ) -
runs what needs to happen after pasting the email.
This is replicated again and again for over 700 lines to pick various emails IDs I need. So the code goes 3 lines by 3 lines and only the line 2 changes to pick that respective email. address.
But in some scenarios, I need to switch on an Extension in the browser like after every 5 emails sent (every 15 lines) , or 10 emails sent (every 30 lines) etc. So I have to always insert that mmmacro code to this line depending requirement.
And that code is taken from Folder 02. And that has around 50 files as well.
What I Need :
Taking the Solution for "Each File in Folder" can something like below be done to tackle the issue at hand.
What my requirement would be in sequence.
01. Read the Macro and Execute what happens before pasting email address.
02. Paste the email address by "Each File in Folder" system not having to be specific.
03. Read the Macro and Execute what happens after we have pasted the email.
04. The above to go on loop.
05. A variable to be assigned like lets say for the set up change, after like every 5 emails sent, or every 10 emails sent run the macro from Folder 2 and this should also keep going not according to number of files in its folder but on a sequence reading each set up file (as said previously I got around 50) from its folder until the above loop stops.( So in a given scenario not all files in it may run, because we may not have so many emails to be sent).
06. The above to go on loop until first loop ends.
Therefore emails would go according to the number of txt files in the Folder 01. And the Variable will decide after how many emails should it launch the broswer extension.
Thanks a lot again for all of you.