Sikuli: How to click on each excel cells specific interval of time?

1k views Asked by At

I am new to Sikuli. I need to click on each excel cell - one by one of the specific interval of time so how can I iterate among the excel cells.

As shown in picture

Update 1: When mouse click on the 1st cell of a hyperlink(i.e. google.com) and specific interval of time again mouse click on the 2nd cell of the hyper link(i.e. gmail.com) and so on till the end of the cell.

Update 2: Actually, I have an excel file - In the file, specific Single column - I want to click on all hyperlink continuously using Sikuli? My question not about time interval but my question is how to click on all hyperlink one by one.

2

There are 2 answers

1
Tenzin On BEST ANSWER

You need to do a few steps.

First locate the image of the 'A' field.
Then define that region below it.

To find an image you could use:

imageA = ("A.png")
columnA = find(imageA).below()

You also have .left() for example.

If you use .hightlight(5) you can see what region Sikuli takes.
But only use that to debug, I had problems with clicking on a field after using that in the code.

You can do 2 things then.
1. Define the region for image of number 1 but then with a left, and where they match you click.
2) Now you know the region where column A starts you could click below it every x pixels.

But I suggest option 1.

1
Eugene S On

If your question is about inserting time intervals, you can just utilize the tools of the programming language you are you are using. For example in Jython(Python):

import time

print("before sleeping")
time.sleep(5) # sleep/wait for 5 seconds
print("after sleeping")

In Java:

Thread.sleep(5000); // sleep for 5000ms which is 5sec