Variable delay with Excel

Discuss RoboTask here
Post Reply
Rukbunker
Posts: 197
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Variable delay with Excel

Post 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?
Oleg
Site Admin
Posts: 3031
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Variable delay with Excel

Post 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.
Oleg Yershov
Rukbunker
Posts: 197
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Variable delay with Excel

Post 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.
Post Reply