← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #261129]: IntelliJ IDEA 14.02 unresolved references after import [from sikuli import *]

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
from the referenced snippet I cannot judge, wether SCREEN.getLastMatch()
makes sense at all.

the Region method getLastMatch() returns the match of the last search op
done in this region as e.g.

someRegion.click(someImage) # indirect search
someRegion.find(someImage) # direct search

and then
match = someRegion.getLastMatch()

so if you are saying, that you are only using "normal" method calls,
then you must reference here the region, that was used for searching
(e.g. s, when you used s.click(img) )

using the convenience scripting with undated Region methods
SCREEN.getLastMatch()
is the same as
getLastMatch()

The reason, that the undotted methods work, is the internal runtime trick:
SCREEN = Screen(0)
and then dynamically register all Region methods with this object SCREEN as global.

... and this is why IntelliJ does not see theses undotted methods at
edit time (SCREEN and the methods simply do not exist yet)

hope it helps.

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