Jump to content
Macro Express Forums

Counting Loops And In Process Sequence

Recommended Posts

I looked around for something that would help me count the number of times my macro runs through it's operations and tell me how many items it had left to complete but could not find what I was looking for. So I just wanted to post this in case anyone else could use it. I have found this to be very helpful when running large files that can take hours to complete. The thing I like most about this code is that I can tell when it will finish even if it's 12 hours away ;) I would have liked to get my hours forecast to be in actual hours instead of a decimal equivalent but could not figure that part out.


ASCII File Begin Process: "Your Text File"

Insert your Macro Steps here !

Variable Modify Integer: Inc (%N5%) [Count the number of Cycles of your Operations]

Variable Set Decimal %D1% to [insert the Average Time it takes to run through your operations one time]

ASCII File Begin Process: "Your Text File"

Variable Modify Integer: Inc (%N6%)

Variable Modify Integer: Inc %N7% = %N6% - %N5%

ASCII File End Process

Variable Modify Decimal %D2% = %D1% * %N7%

Variable Modify Decimal %D3% = %D2% / 60 [Decimal equivalent of 1 hour]

Round Decimal Variable %D3% to 2 Decimal Places

Text Box Display: N6 = Total Count of lines in Text File

N5 = How many lines have incremented (Count)

N7 = Remaining to Process from Text File

D3 = Expected Finish Time in Hours Expressed as a decimal

Variable Set Integer %N6% to 0

ASCII File End Process

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...