rbousfield Posted November 20, 2006 Report Share Posted November 20, 2006 Although very new to this program, I am finding it quite fantastic and the opportunities for its use seem endless. I am wanting to use ME to; open an Excel spreadsheet, run recalculation then save the result, rename, and send email. All is fine except the Excel recalculation can vary in the time (1 to 5 minutes) it takes to finish, so ME can sometimes start the next step before the Excel recalc has finished. I have tried "wait until file is ready" although I suspect this is not the correct method especially as it doesn't work. I wasn't too keen on setting the waiting time as a set period, as I would have to set this for too long to be sure. Any suggestions and/or advice very much appreciated. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
kevin Posted November 20, 2006 Report Share Posted November 20, 2006 Is there something that gives you a visual clue that the recalculation is occurring? For example, is there another Window that comes up, does the title bar change, does the mouse pointer change, or is there a specific area of the screen that changes color? There are macro commands to detect these types of events: // Another Window If Window Title "Recalulating" is running End If // Titlebar change Variable Set String %T1% from Window Title If Variable %T1% contains "Recalulating" End If // Mouse pointer change Wait for Mouse Cursor: Arrow // Color on screen changes Get Pixel: Window Coords: 100,200 into %N1% If Variable %N1% = 15836021 I would try the Wait for Mouse Cursor command first. For the other techniques you will need to use a Repeat loop. Something like this: Variable Set String %T2% "" Repeat Until %T2% = "DONE" If Window Title "Recalulating" is running Variable Set String %T2% "DONE" End If Delay 0.25 Seconds Repeat End You may also be able to use the Wait Window Lose Focus command like this: If Window Title "Recalulating" is running Wait Window Lose Focus: "Recalculate" End If Quote Link to comment Share on other sites More sharing options...
kunkel321 Posted November 25, 2006 Report Share Posted November 25, 2006 Maybe this person could use Conditional Formatting in Excel to flag when the calculations are complete... ME would then detect this change (use fill color for this). (??) -steve Quote Link to comment Share on other sites More sharing options...
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.