← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #193849]: [EXAMPLE] XBMCFlix-o-mate Automating Netflix Silverlight Controls

 

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

bengalih posted a new comment:
1) Thank YOU for the comprehensive feedback!

2) I use the "\Program Files\" directory pretty much exclusively when I
talk about where things get installed.  I feel at this point in time
that anyone using a x64-bit system should know that non 64-bit programs
install to the (x86) Folder  So, I was just giving a quick overview.  As
I pointed users to your site to get Sikuli, and let them know that full
instructions are there.  I'll re-read the doc and either clarify or
remove that part.

3)  I think that section should have been removed.  When I was initially
having a problem with my debug issues (from the prior thread) I reworked
things a bit.  One of the things I did was to never use the full screen
as my search region.  Previous to this I was setting my ROI back to the
whole screen, but realized that was unnecessary.  I didn't however
remove the code which generated that regionScreen for me.  As far as the
hoverPoint = getCenter(), do I need to define a region for that - or if
I just put it early in the script prior to setting any specific region
it will automatically use the center of the screen resolution?

I think I understand your preference for region.method as you describe,
and will look to that again on next revision.

4) setFindFailedResponse(SKIP) vs. exists - I see your point here.  I
may have actually had exists() prior to reworking some of this to try
other methods when I had my debug problem.  I'm not sure it makes much
of a difference to me here though.  The behavior of the GUI is pretty
expected, and if the image I want to find and act on isn't there, I
simply want it to time out within a second or so and await another
keypress.  At this point in time, I don't see any exception that I would
want to act on, since I don't know what else I could possibly do.  The
minute that becomes an issue however I will take this into
consideration.

Is the timeout for an Exists controlled the same way as for a Find?

5) setROI - yes i realize the multiple calls were unnecessary, but I put
them there as a safeguard in case additional code changes were inserted,
this would make sure I was ALWAYS targeting the correct region on a
specific click.  This definitely was one of the things I changed during
my debug issue because I wanted to make 100% certain.  I feel they don't
really hurt from either an overhead or readability perspective, but they
are admittedly redundant.  I do believe that the region.method as you
suggest will be preferable though.

6) netFlixLaunch(None) - thanks...this was one of those areas that i
wasn't sure how to adapt the code without a specific example.  I didn't
know how to call an event subroutine without the event!

7) getLastMatch - that seems to make sense, I don't think I found that
method till later on, and was a bit confused to its purpose.  It does
seem that it will streamline a bit, so I will attempt those changes.

8) I think that situation you describe as the "only situation" is what I
am looking for.  One of my biggest complaints about Sikuli is the CPU
overhead when searching for an image.  These spikes can be disruptive,
especially with my app when watching video.  My perspective was that the
image SHOULD always be there when the user presses the hotkey.  If it is
not, I don't believe waiting another 2-3 seconds is going to make a
difference there in terms of the image appearing.  Perhaps I am still
not understanding your explanation, but I have found that the longer it
is waiting around means the longer the CPU is searching for the image
and that utilization maxes the processor on some machines.  In my tests
on two quite different machines, the clicks seem to always take place
when expected.  So, when you say it does not "speed things up" that is
correct if I need to wait around for something to be clicked, but at
this point I would rather it simply time out immediately if it can't
fulfill the  request rather than eat up CPU cycles - even for a few
seconds.

9)  I looked over the Settings class in the Sikuli doc.  Are you saying
that I can create any Settings.xxxxx class and reference it globally
throughout the script?  Is this a feature of Python in general or
Sikuli?  That certainly will make things easier...as I needed to figure
out why my variable wasn't working properly until it was globally
declared.


Unfortunately the Netflix plugin that I wrote this to assist has been dead in the water for a few months as the developer is MIA.  The new version of XBMC was just released and the Netflix plugin is not listed in the repository for the new version because of this.  So, I think i won't get a lot of user feedback until this is addressed, or at least it will take some time for word to get out there.  There was previously another solution to do what my script does, but based on my research it no longer worked since Netflix changed their plugin last year.  Apart from that, I think people have just been using AHK or AutoIt scripts to get their movie into full screen, but that would have to be customized based on screen resolution and didn't provide for the other features I included.  In any event, the time I spent is well worth it to me, as I will be using it on a daily basis.

thx!

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