← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #177994]: Comparing screenshots dynamically

 

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

    Status: Answered => Open

Hari Kiran Vankayala is still having a problem:
Hi Raiman,

I ran the below script

click("App.png")
# settings
import os
import shutil
dir = "/Users/hari/Desktop"
savedir = os.path.join(dir, "savedimages")

# action

baseimg = os.path.join(dir, "Expected.png")
capreg = Region(887,85,500,380)

img = capture(capreg)
shutil.move(img, os.path.join(savedir, str(int(time.time()))+".png")

f = Finder(baseimg)
        
f.find(img) # find all matches
if f.hasNext():
        print "Image is matching"
else:
        print "Image is not matching"
f.destroy()


I am facing the below issue, could not able to solve. Sikuli is stopping at f = Finder(baseimg)
Can you please help.

[error] Stopped
[error] An error occurs at line 16
[error] Error message:
SyntaxError: ("no viable alternative at input 'f'", ('/var/folders/7O/7OYo3pwNFseqmd9waLgz3E+++TI/-Tmp-/sikuli-tmp14715735451173188.py', 16, 0, 'f = Finder(baseimg)\n'))

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.