[Sikuli-driver] [Question #686476]: Command line SikuliX slowness

2019-12-01 Thread Anup K
New question #686476 on Sikuli:
https://answers.launchpad.net/sikuli/+question/686476

While using SikuliX from command line looks like slowness on  startup the 
Surface automation activity.
Simple command line argument print taking time(approx 32 sec). I guess its from 
the framework startup time.


Command line script run command :
java -jar sikulix.jar \commandLIne.py -- "1"

My SikuliX  commandLine.py code:
import sys
print (sys.argv[1])  #it will print 1

Version details : 
version using 2.1.0-SNAPSHOT

Time taking : 
32s

Can you please let me know the reason of slowness or way to mitigate it. 


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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #686458]: Getting ReferenceError "Commands" is not defined

2019-12-01 Thread towards eternity
New question #686458 on Sikuli:
https://answers.launchpad.net/sikuli/+question/686458

I've downloaded both ide and jpython file.
Then run the sikulix.jar with "java -jar sikulix.jar" without error.
Now whatever I type to IDE and try to run, get the same message:

javax.script.ScriptException: ReferenceError: "Commands" is not defined in 
nashorn:mozilla_compat.js at line number 69 

Can't find  the exact error in google. 

Can you help me?

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686442]: Using onAppear

2019-12-01 Thread Mark McGuinn
Question #686442 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686442

Mark McGuinn gave more information on the question:
I have been experimenting with this and despite using the IDE tool  to
define a region I am getting the following in the error messages:

error] Region: observe: Nothing to observe (Region might be invalid):
R[541,309 597x407]@S(0)

This is the code I am currently using, am I doing something wrong with
the way I am calling this function?


modelarea = Region(541,309,597,407)

# while not (findWord(modelname) or findWord("ANY")):
print modelname

def changed(event):
print("Found It")
modelarea.stopobserver()

modelarea.observe(10)
 
modelarea.onAppear(  "1575203969807.png",changed)

for step in range(5):
click(Pattern("1575203845288.png").targetOffset(250,123))

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #686442]: Using onAppear

2019-12-01 Thread Mark McGuinn
New question #686442 on Sikuli:
https://answers.launchpad.net/sikuli/+question/686442

In version 2.0.1 I am trying to use the onAppear function to catch when a 
specific piece of text appears. Below is the code I am using, it simple click a 
button which causes the image to change. The expected image is within five 
clicks of the button but the onAppear does not see it and the next click 
happens which takes away the text I am looking for.I have trued passing the 
text as a constant, as a variable and as shown in the code as an image. None 
worked.


def changed(event):
print("Found It")
 
regmake.onAppear(  "1575203969807.png",changed)

for step in range(5):
click(Pattern("1575203845288.png").targetOffset(250,123)

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread Mark McGuinn
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Answered => Open

Mark McGuinn is still having a problem:

Have managed to get somewhere with v2.0.1. Now getting to the point where it 
does the findText but it fails with an error even though the text is in the 
image:

Code

reg = Region(300,293,1083,535)

m = reg.findText(carmake)

print m

Error
[error] script [ Mensel ] stopped with error in line 25
[error] FindFailed ( FORD as text )
[error] --- Traceback --- error source first
line: module ( function ) statement 
25: main (   ) m = reg.findText(carmake)
[error] --- Traceback --- end --

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread masuo
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Open => Answered

masuo proposed the following answer:
Switch on [allow searching for text] check box.
And  restart  SikuliX IDE.

If that doesn't work, I don't know any more.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread Mark McGuinn
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Answered => Open

Mark McGuinn is still having a problem:
Did as suggested and am still getting an error:

[error] RunTimeIDE: ImageMissing: FORD
[error] RunTimeIDE: Wait: Abort: Jython: at Mensel (20)
[error] script [ Mensel ] stopped with error at line --unknown--

This is where I pass a hard coded string to the find command


reg = Region(300,293,1083,535)

m = reg.find("FORD")

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread masuo
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Open => Answered

masuo proposed the following answer:
Please check option setting, if you use SikuliX1.1.3 .
[allow searching for text] check box may be off.

Open Preferences Window
[File]-[Preference]

Open Preferences:more Options...
[more options...]

Switch on [allow searching for text] check box.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread Mark McGuinn
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Answered => Open

Mark McGuinn is still having a problem:
Hi,

thanks for the feedback. I had been using 1.1.3 because I could not get
the side tab with the various coding shortcuts to work in v2. If I try
to run the script in v2.0.1 I get a strange problem in that the ide will
move the mouse to the correct point on the screen but will not click as
it is supposed to. This is he first step in the script so I cannot
confirm the solution until I can reach that point in the test script.

If there is something which is stopping the script from clicking in v2
would you let me know. Below is the code

#
Settings.OcrTextSearch=True
Settings.OcrTextRead=True
# Open a spreadsheet and read values
def openAppleMenu(event):  
   
import java.lang.System
import java.lang.Object
import java.awt.event.InputEvent
carmake = "Ford"
Env.addHotkey(Key.F1, KeyModifier.ALT+KeyModifier.CTRL,openAppleMenu)

click("1575150169419.png")
wait("1575150442463.png")

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #686421]: How To Input a variable containing text to reg.find()

2019-12-01 Thread masuo
Question #686421 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686421

Status: Open => Answered

masuo proposed the following answer:
Do you use SikuliX1.1.4 or SikuliX2.0?
You have to use findText instead of find.
https://sikulix-2014.readthedocs.io/en/latest/news.html#revision-of-the-text-find-api

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp