← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680652]: how to use Region.onChange in pyton with jpype

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
at the Java level use:
someRegion.onChange(long, callback)

where long is the minimum size for changed pixels (default 50)

so my Java example again with 2 parameters:// one has to combine observed event and its handler
// overriding the appropriate method
someRegion.onChange(50, 
        new ObserverCallBack() {
                @Override
                public void appeared(ObserveEvent event) {
                        // here goes your handler code
                }
        }
);
// run observation in foreground for 10 seconds
someRegion.observe(10)

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