0

I am new to Sikulix and I am running into a problem. I am trying to follow a tutorial, but the type() function does not seem to work.

I am working on a windows 10 machine 64bit, with sikulix 1.1.3 IDE. Below is an image of my simple script in which I try to start the calculator in windows.

enter image description here

Both clicks are executed, but the type is not. It also doesn't show up in the log screen:

enter image description here

Is this a bug or am I missing something?

Haney
  • 32,775
  • 8
  • 59
  • 68
Freeze
  • 237
  • 1
  • 5
  • 12

2 Answers2

0

Put a wait(1) right after the click

And do

type("Calc")
type(Key.ENTER)

The issue you're having is your type statement: type("calc" + Key.ENTER)

This should be avoided.

You could try type("calc", Key.ENTER) but I'm unsure if this works. Hope this helps!

0

I think this is a bug in 1.1.3.

I am running 1.1.0 on a 64 bit Windows 10 PC and this code worked fine for me. I have never had issues concatenating a Key with a String because in Sikuli most of the key constants are actually String values including Key.ENTER documented here.

Maybe try:

wait(image)
type(image, "calc" + Key.ENTER)

Using type this way will click the image and then type whatever is in the second parameter.

Side note for @Michell Monarch:

type("calc", Key.ENTER) will search for the text "calc" on the screen, click it, and then press enter