Multiple else if

Asked by Adam Sycko on 2017-08-03

I am new at this program and i have problem

When im trying to make a bot to game called Metin its just not working

So i have problem with else/if (i dont know how to make this bot)

Bot need to click 2 images at start wait when appears image and click one of 5 options
I mean this

I was trying to write this code but i just dont know how (And yes i was searching forum and dont found answer for my problem)

If someone can help me i will be grateful.

And 2 nd question how to make infinite lopp in this code.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

The message at the bottom states that it is an indentation error.

All "elif" statements must be at the same indentation level as the "if" they belong to (and the last "else" as well).

See the Python manual for details how Python uses indentation to group statements.

Adam Sycko (fflanker) said : #2

I corrected what you said but now I have a problem with some hover

Manfred Hampl (m-hampl) said : #3

There seem to be some extra quotes and parentheses in the line before.

Adam Sycko (fflanker) said : #4

Okay i have re writen my code (watching some of tutorials on yt)
But stilll i have problem with one thing
Its always click 2 times when i want to as many times as it is in the picture


Adam Sycko (fflanker) said : #5

Btw. In this last screen i dont havy any errors in console

Manfred Hampl (m-hampl) said : #6

I assume sleep(0.01) isn't long enough, and the multiple clicking will be interpreted as doubleclick.

Adam Sycko (fflanker) said : #7

Okay i have changed 0.01 to 0.4 but now its to slow and script dont work corectly with game

Adam Sycko (fflanker) said : #8

And he dont click what he see on screen i think he clicks random
Not what i want

Launchpad Janitor (janitor) said : #9

This question was expired because it remained in the 'Open' state without activity for the last 15 days.