Automatic question respondents

Asked by kakaleta

i need automatic question respondents code... I choose to answer questions but i have error.

My Code (i am new . i don't know java)

Click (Answer picture) 1. The Answer
Click (Answer picture) 2. The Answer
Click (Answer picture) 3. The Answer
Click (Answer picture) 4.
Click (Answer picture) 5.
Click (Answer picture) 6.
Click (Answer picture) 7.

But is always complicated questions. sort is always changing.
I want 1 answer or 2 answer Click. between the answers I want, or 3.4.5.6.7.8.
When I run I get an error at first.

i will add 300 answer picture.

i hope you help me...

Question information

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

--1. Sikuli scripts are written in Python language

--2. Already had a look at the docs: http://sikuli.org/docx/ ?

--3. how to choose an image to click:
this faq 1568 might help to decide for the appropriate approach

--4. 300 answer pictures
The images have to be organized in a list (array) or need some naming convention, so that the actions needed for an image can be programmed once as functions (def()'s) to be called in the workflow with a regarding image (after knowing, which image has to be clicked or in a loop).
faq 1437 might be helpful

an example:
finds the first image in the list

imgs = ["image1.png", "image2.png", "image3.png", "image4.png"]
found = False
for img in imgs:
    if exists(img, 0):
        click(getLastMatch())
        found = True
        break
if not found:
    print "None of them appeared"
    exit(1)

Revision history for this message
kakaleta (91antikor) said :
#2

Thanks for you message but very difficult for me to learn. I just want a little code.

1. can't find image of the 2. can't find image of the 3. Click the finds. (ETC. 200 answers)

Did you understand to me ?

Meanwhile just i will add 200 answer pictures.

Revision history for this message
kakaleta (91antikor) said :
#3

i have had error first picture because it's doesn't find other picture..

I want to I can't find the picture between the second picture ...3.4.5.100.150.200. etc..

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

Sorry, but I do not understand your intention.

suggestion:
make 2 or 3 relevant screenshots of the situation where you try to find and/or click one of your 200 pictures. pack some of the images and the .sikuli folder all together in a zip file and send it to my mail at https://launchpad.net/~raimund-hocke.

I will have a look at it and try to make you an example.

What is your system environment?

Revision history for this message
kakaleta (91antikor) said :
#5

okay i sent you message.

Revision history for this message
kakaleta (91antikor) said :
#6

or i will send video and file... wait my message 20 min. pls.

Revision history for this message
kakaleta (91antikor) said :
#7

Video Files: http://hotfile.com/dl/118120934/415ae6b/test.rar.html

Watch and pls help to me :)

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

ok, I understand the challenge.

In "manual" game mode
-- you have to read and understand the question
-- you have to click the correct answer
-- wait for the next question

during the 90 seconds the questions are always numbered beginning with 1, but on each new turn of 90 secs, the questions vary (there is a possible selection out of 200 (or 300?) questions).

I do not think, that an "automated" answering is possible with the current version of Sikuli:
- the question can only be identified with it's text
- finding the answers (that have been captured before like you started) would take too long. Even in a fully optimized script with every question you would have to check every 200-300 possible answer pictures. one search takes at least 0.2 seconds average (optimized!), so with e.g. 200 questions answering the first question would take about 30 seconds - I think you are faster ;-)
- I do not know, how often you have to run the 90 seconds, until you have seen all questions

conclusion:
- what ever you do, (either identifying the question and click the correct answer or looking, which of the stored correct answers are currently visible), to automatically answer a question takes about 30 seconds and even more.

Even if you succeed in building a "database" containing the question and it's correct answer, you are left with the challenge to find out which question shows up. One last idea might then be to identify the question by it's text, but whether this is possible at all with the used font in the app.

At least it is possible, to make a script that helps you collecting the questions and being faster than with the manual capturing as you did it.

suggestion:
make some screenshots of the area i put in the attachment.
zip them together and send them by mail. I would make some tests.

Is it a local app or does it run in a Browser window (e.g. flash app)?

RaiMan

Am 17.05.2011 um 17:01 schrieb kakaleta:

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

kakaleta posted a new comment:
Video Files: http://hotfile.com/dl/118120934/415ae6b/test.rar.html

Watch and pls help to me :)

--
You received this question notification because you are an answer
contact for Sikuli.

Can you help with this problem?

Provide an answer of your own, or ask kakaleta for more information if necessary.

To post a message you must log in.