Page 1 of 1

Variable delay with Excel

Posted: Wed Apr 06, 2016 7:44 pm
by Rukbunker
We have a Excel file where there needs to be a macro executed. But the file sometimes opens within 5 seconds and sometimes after a minute (!), before the macro can run ofcourse. First the file has to be completely loaded. A delay of 120 seconds will do, then we're covered. But it think it can be made easier, at least...I hope!

Excel is done loading the document when there is "Ready" in the left down corner. Then the next action (execute the macro!) can be started without worrying about delays. Is there a possibility (pixelcolor?) that as long "Ready" is not there, Robotask should wait until the next action?

Re: Variable delay with Excel

Posted: Mon Apr 11, 2016 10:18 am
by Oleg
What actions do you use?
I recommend you to use Excel actions.
These actions use COM interface of MS Excel and they should wait for document availability.

Otherwise you have to use some indirect methods. For example - Pixel color of the window.

Re: Variable delay with Excel

Posted: Wed May 04, 2016 5:43 pm
by Rukbunker
I have solved it with the ScreenPixel function. Because we use Citrix, I can't refer to a window title, because it's not "local".
While the pixel does not have a specific color, then do a delay of 5 seconds until the pixel has a given HEX value for that color. Works great.