← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #685372]: The script does not work

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
#from sikuli import * # not needed in IDE main scripts#

#openApp ("C: \\ Users \\ User \\ CALK \\ calk-pro_x64.exe")
# no intermediate spaces
# see docs for class App
calc = App("C:\\Users\\User\\CALK\\calk-pro_x64.exe")
calc.open()
if not calc.isRunning(10): # wait max 10 seconds
    exit(1)

# no sleeps needed, since search waits 3 seconds max for image
click ("btn1.png")
#hover ("ktrbtnyes.jpg") #does not make sense (click follows)
click ("ktrbtnyes.jpg")

Not sure, wether you have looked through the docs already:
https://sikulix-2014.readthedocs.io/en/latest/index.html

Depending on your monitor situation (HiDPI ?, scaling>100%?, ...) you might have problems with external snapshots
see: https://bugs.launchpad.net/sikuli/+bug/1730645
It is highly recommended to take the images with the IDE.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.