← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688843]: How to click on current date using sikuli?

 

Question #688843 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688843

    Status: Open => Answered

Manfred Hampl proposed the following answer:
I see two possibilities:

1. If the position of the current date is always the same on the screen (e.g. 150 pixels from the top, 30 pixels from the left), then you use that position as your click target.
https://sikulix-2014.readthedocs.io/en/latest/region.html#Region.click
click(Location(x,y))
(replace x and y by the desired coordinates)

2. If you know the date format that is used to indicate the current date on the screen, then you can construct a string of today's date in this format and try to find it on the screen.
https://sikulix-2014.readthedocs.io/en/latest/region.html#Region.find
find(time.strftime(%m/%d/%Y))
(adapt the format string as applicable; "import time" probably required at the beginning of the script)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.