if-then

Asked by carlito

every scripting language has if-then-else and i cant seem to figure out how to accomplish this with sikuli's api.

i want to write a script that will either change my second monitor's resolution (from 720 to 1080) or if its disabled, turn it on. i saw on the demo section that someone wrote a facebook script that included something like "if x is true then y" but i dont see how to do that from the api page.

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
Sergey Darovskih (darovskih) said :
#1

if condition:
   dosomething
else:
   dosomethingelse

you can find example here: http://sikuli.org/documentation.shtml#examples/user-capture.sikuli/user-capture.html

Can you help with this problem?

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

To post a message you must log in.