sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21792
Re: [Question #237431]: Need help with regions and my macro
Question #237431 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/237431
Status: Open => Answered
RaiMan proposed the following answer:
Sikuli really is the tool, that will help you to accomplish, what you
want.
In fact, your usecase is rather simple ...
... but to get on the road, you have to
- get familiar with Python language (have a look at the faqs https://answers.launchpad.net/sikuli/+faqs)
- do some trials with the basic features
- look in the net for hundreds of examples (google is your friend)
The challenge with Sikuli getting running workflows is to look at the screen with "gods eye" (the meaning of Sikuli ;-).
The main feature of Sikuli is to find captured images on the screen or wait for their appearance.
So the backbone of your workflow always is a row of:
- wait for an image to appear
- do some action
- wait for an image to appear
- do some action
....
... and
- parts of this workflow might be repeated (loops or functions)
- parts of the workflow might only be executed when some condition is met or not
so since you already know your workflow, go back and write it down again
in the above manner:
- if game not started: message and exit
- if not exists start button: message and exit
- click start button
- wait for the card-screen max 20 seconds
- if not exists card-screen message and exit
....
you can write this directly in the script by just prepending each line
with # (comment)
now you can try to add real script statements like
# if not exists start button: message and exit
if not exists(<start-button-image>):
popup("start button missing")
exit(1)
# click start button
click(getLastMatch()
....
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.