How to make click(excelARROWdown) * 36 work

Asked by Colby Black

I thought you could make a line repeat by adding a * after the () is this not true? I'm trying to clean up this code

#I copy an email address from one place then want to hit let sikuli find it in an excel list of about 2000 emails. It does a search function, finds it and always puts it in the middle of the excel page. Well, for my second code to work, I need that email at the top of excel, so I have to hit down arrow exactly 36 times. Is there an easier way to do this or a cleaner way to repeat the clicking of the downarrow in excel? Thanks guys!

click(excelMENU)
type("f",KEY_CMD)
type("v",KEY_CMD)
type(Key.ENTER)
click(excelCLOSE)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)
click(excelARROWdown)

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Colby Black
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

for n in range(36):
    click(excelARROWdown)

Revision history for this message
Colby Black (coboblack) said :
#3

@ RaiMan

Hahaha, what do you think I'm doing. You'd be surprised at how good the code I have right now is doing for someone who literally started learning this 3 days ago. =D

So far its 35+ lines, can log into multiple emails with appropriate proxies, trouble shoot login errors, mark them on my excel spreed sheet and then it can add filters inside all the emails. Needed to do it for work, and it works perfect for about 80% of the time, I'll have to restart it every now and then but its been a good learning project.

I appreciate you guys answering questions for me. It would be impossible without some having someone to troubleshoot.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

really impressing.
all the best for your future stuff.

I have hidden the mentioned comment ;-) pls. forgive me :-)