Is that healthy to write long commands?
Greetings,
I'm not sure whether this question is Siluli oriented or of a more general type. But I will try.
Ususally, when I needed to locate a pattern within specific area or relative to another pattern, I would follow steps that look like that (in this case I want to locate and lick in a button that is loctaed from right to a pattern):
1. pat = find("pattern.png")
2. pat.highlight(1)
3. patR = pat.right()
4. patR.highlight
5. but = patR.find(
6. but.highlight(1)
7. but.click()
However, it is also possible to do all this just in one line, which makes the code more easy to maintain. So to rewrite the above lines:
find("pattern.
This works perfectly but for some reason I'm not sure if that's the better way to do that. Can someone advise or share his opinion on such way of organizing the code? Is that safe/healthy or maybe more prone to errors in a way I haven't discovered yet?
Thanks!
Eugene S
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: