Reduce usage of if-statements?
Asked by
Calle Rundgren
I got two versions of the program I am automating. In the different versions of the programs the set of icons is not the same. I want to make a script who is universal and could be used in order to automate both versions.
An example on how a script could look like:
imgver1=(image1)
imgver2=(image2)
if exists(imgver1):
click(imgver1)
if exists(imgver2):
click(imgver2)
Is this the best way in order to perform the task? If my scripts getting longer there will be many if-statements.
Can I in some way reduce the usage of if-statements?
TYIA
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:
To post a message you must log in.