[request] way to run Sikuli's image match preview

Bug #666402 reported by Human
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Wishlist
RaiMan

Bug Description

I would like to request a new flag to the sikuli-ide.sh command that would take a parameter of a PNG file, and go directly into the pattern match preview popup that the IDE provides when clicking on an image. Something like: sikuli-ide.sh -i imageToTest.png

Rationale: Following an example I saw here, I'm writing a lot of Sikuli-enhanced support libraries, using the "execfile()" workaround to import the libraries into the Sikuli JUnit scripts. As I get better using the Sikuli API, I find that I use the IDE less and less for authoring and maintaining scripts, but I do have a need to test image matches against various states of the application I'm testing. Currently, I work around this by just creating a 'scratch.sikuli' project, and I can copy the PNG files I want to test into scratch.sikuli and list them in scratch.py.

I assume that others who develop a test library and a series of utility methods have a similar workflow, and I hope it'd be of general use to others to test image matching without the IDE.

Tags: ide
Revision history for this message
Rolf Wilms (rolf-wilms) wrote :

While I'm still using the IDE, I can also imagine using a dedicated editor or IDE for Python script, e.g. one with code-completion, debugging etc. Should be possible e.g. using a Python Eclipse plugin with jython support.

Some of the unique features of the Sikuli IDE should still be available.
To me, most important would be:
1. show the picture for a *.png file
2. match/identify it on the screen (your request)
3. interactively adjust the sensivity
4. adjust the click point

To me it seems as if a simple and flexible way to achieve this would be using the clipboard:
The Sikuli dialog stays open and polls the clipboard until something with "png" appears, possibly surrounded by Location, Pattern clickpoint or sensivity source code.
It then shows the image, possibly applying a search path to find it.
I can the use the dialog to match/identify and adust.
When finished, I press a "copy" button which copies the whole thing with sensivity and clickpoint updated back to the clipboard, from where I can paste it back to the editor.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@Rolf: In my Mac environment I totally switched to Netbeans as IDE (same is possible on Windows - even with Eclipse). I have all these helper features you mention above implemented using applescript and my XMLRPC solution, to trigger Sikuli actions without any startup delay.
And in fact it is based on using the clipboard forth and back (since Sikuli now only has a getClipBoard(), you have to use paste() to put something on the clipboard (on Mac this is a 2-liner in applescript that can be run from Sikuli using popen() and osascript)).

The next days I will find out how to have it on Windows (I only need an alternative for applescript, to make my RP-Calls, the rest works - guess I will use native Python and Shell-scripting)

RaiMan (raimund-hocke)
summary: - wishlist: way to run Sikuli's image match preview
+ [request] way to run Sikuli's image match preview
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → Wishlist
RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
assignee: nobody → RaiMan (raimund-hocke)
tags: removed: wishlist
tags: added: ide
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Wishlist → Low
milestone: none → x1.1
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 1.1.0 → 1.2.0
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Low → Wishlist
milestone: 2.0.0 → 2.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.