1

As stated in the title, using Sikuli, what is the functional difference between s.click("image.png") and s.click("image.png",0)?

I haven't been able to find anything about this modifier in the documentation and haven't noticed any functional difference in my Java scripts using one or the other.

I ask because I see the extra ,0 used in other's scripts constantly, but do not understand why.

Are there other modifiers people use instead of ,0?

jagdpanzer
  • 693
  • 2
  • 10
  • 35

1 Answers1

2

The addition of the zero acts as a clear indication there are no acting modifiers.

Possible modifiers for click(PSRML target, int modifiers):

Can be 0 (no modifier), K_SHIFT, K_CTRL, K_ALT or K_META

I found the answer in this documentation, and here is more information on available modifiers.

CubeJockey
  • 2,209
  • 8
  • 24
  • 31
  • Oh, alright. So essentially, `click("image",K_SHIFT)` would be the equivalent of a shift-click, if I'm thinking correctly? – jagdpanzer Dec 29 '15 at 19:07
  • 2
    I believe so! I saw a (barely) related question on SO about using a ["Ctrl+C" keyboard entry](http://stackoverflow.com/questions/6337629/how-to-send-ctrl-c-in-sikuli) which may help you. Unfortunately my only experience with Sikuli is looking up documentation for your question. :) I've edited my comment to include the documentation for Sikuli modifiers. – CubeJockey Dec 29 '15 at 19:10