Re: [Sikuli-driver] [Question #295053]: .focus() and .isRunning() Issues

2016-06-08 Thread Ryan
Question #295053 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295053

Description changed to:
Hello - I have been experiencing a strange issue with the App class. As
of just last week I had been getting different behavior out of both
these methods.

I had a long post here about how .focus() and .isRunning() behave
erratically when you have many apps that run off java.exe (despite
having different PIDs).

To verify that all of them were running, you needed to focus() before
doing an .isRunning() check.

.focus() or .isRunning() seems to strip the app name that you pass in
creating an app.

Fortunately, this process can be solved by using app.window() to verify
if a window is running. (Returns Null if no window).

A bit more clarity on the .isRunning and .focus() methods would be very
useful though as they do not seem completely reliable.

-- 
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 #295044]: Java Swing app: Sikuli not working

2016-06-08 Thread RaiMan
Question #295044 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295044

Summary changed to:
Java Swing app: Sikuli not working

-- 
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 #118177]: wait command

2016-06-08 Thread Shiva Golchi
Question #118177 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/118177

Shiva Golchi requested more information:
Is there any way to set this timeout as a global setting to apply to all 
exists() s?
e.g. I have a code with a lot of assert exists(image) s for a UI; however my 
application can be laggy sometimes and on every run it can take a random time 
for the images to show up. So I get random assertion errors every time I run 
the script on random images. 
I have been using setAutoWaitTimeout () as a global setting but seems not to be 
working on assertions.

-- 
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 #295053]: .focus() and .isRunning() Issues

2016-06-08 Thread Ryan
Question #295053 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295053

Ryan posted a new comment:
Would still like some clarification on this question.

However, using app.window() as a check seems to work much better.

This seems to be contingent on things not being minimized.

-- 
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 #295053]: .focus() and .isRunning() Issues

2016-06-08 Thread Ryan
New question #295053 on Sikuli:
https://answers.launchpad.net/sikuli/+question/295053

Hello - I have been experiencing a strange issue with the App class. As of just 
last week I had been getting different behavior out of both these methods.

Currently trying to get SikuliX to verify that a program which opens many 
different windows and processes started correctly. Most of the windows have 
java.exe as their process (but have different PIDs).

Last week code of this nature worked well -

app=App("window title name here")
app.focus()
if not app.isRunning():
   print "False" 
else:
   print "True"

After testing it was determined that the app.focus() was needed for 
app.isRunning() to pick if the window was running or not consistently.

Now however after running app.focus() the app seems to be stripped of its 
window title and is now only recognized as it's short name-

Code and Output Example:
I will use DESIRED for the name of the app I want and OTHER as the title of 
another java.exe program that also starts with the program. This is the first 
one that opens so that is why it always shows up.

Code:
app = App("DESIRED")
print(app.getName())
print(app.getWindow())
app.focus()
print(app.getWindow())
print(app.isRunning())
print(app.getWindow())
print(app.isRunning()) 

Output:
java.exe
Desired App
[error] App.focus failed: [12860:java.exe (OTHER)] DESIRED
Other App
False
Other App
True

**

The script brings focus to the desired window correctly but then says the focus 
failed.

EXAMPLE 2:

Code:
appName = "DESIRED"
app = App(appName)
print(app.getName())
print(app.getWindow())
App.focus(appName)
print(app.getWindow())
print(app.isRunning())
print(app.getWindow())
print(app.isRunning())
print(app.getWindow())

output:
java.exe
DESIRED
[log] App.focus: [8304:DESIRED]
DESIRED
False
DESIRED
True
OTHER

*

Another person is running the same exact full scripts as I am and having it 
work the way it was last week, even though the log kicks back a focus error, it 
searches for the correct PID with .isRunning() and does not change it.

Anyone have any input or ideas on this? Happy to provide other information. 


-- 
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 #285483]: isLockOn does not change until typing from the keyboard

2016-06-08 Thread Alex Lunyov
Question #285483 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/285483

Alex Lunyov posted a new comment:
Hi!

There is a similar problem.

In SikuliX 1.1.1 2016-6-6 this code:

for i in range(5):
type(Key.NUM_LOCK)
wait(20)# long wait for expected certainly internal 
system changes
print(Env.isLockOn(Key.NUM_LOCK))

prints five "True" while the Numlock led toggles with delay 20 sec. By
the way internal Numlock is actually switches, only the result of
Env.isLockOn() is always the same.

I expected it will print a sequence True/False.

-- 
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 #295044]: Sikuli not working when running it with a jar file

2016-06-08 Thread J.kodak
New question #295044 on Sikuli:
https://answers.launchpad.net/sikuli/+question/295044

i wrote a java program using sikuli and swing, but when i build it to jar, the 
swing interface appears but the sikuli program doesn't run.

Thank you.

-- 
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 #294120]: Setting up sikuli script for remote machine

2016-06-08 Thread Launchpad Janitor
Question #294120 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/294120

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

-- 
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 #295041]: (Chinese (Traditional)) [debug] Mouse: init

2016-06-08 Thread ilovecat2...@hotmail.com
A question was asked in a language (Chinese (Traditional)) spoken by
none of the registered Sikuli answer contacts.

https://answers.launchpad.net/sikuli/+question/295041

Dear Sir,

I am trying to integrate sikuli API into my netbeans GUI program but it shows 
the following errors.
Seems it is something relating to mouse which can't be initialize.
Please help.


[debug] Debug.init: from sikuli.Debug: on: 3
[debug] RunTimeINIT: loadOptions: check: 
C:\Users\Jonathan\Documents\NetBeansProjects\test
[debug] RunTimeINIT: loadOptions: check: C:\Users\Jonathan
[debug] RunTimeINIT: loadOptions: check: 
C:\Users\Jonathan\AppData\Roaming\Sikulix\SikulixStore
[debug] RunTimeINIT: global init: entering as: API
[debug] RunTimeINIT: Monitor 0: (-1366, 154) 1366 x 768
[debug] RunTimeINIT: ScreenDevice 1 has (0,0) --- will be primary Screen(0)
[debug] RunTimeINIT: Monitor 1: (0, 0) 1920 x 1200
[debug] RunTimeINIT: runs as sikulixapi.jar in: C:\Users\Jonathan\Desktop\API
[debug] RunTimeINIT: exists libs folder at: 
C:\Users\Jonathan\AppData\Roaming\Sikulix\SikulixLibs_201510051707
[debug] RunTimeINIT: addToWindowsSystemPath: added to systempath:
C:\Users\Jonathan\AppData\Roaming\Sikulix\SikulixLibs_201510051707
[debug] RunTimeINIT: checkJavaUsrPath: added to ClassLoader.usrPaths
* show environment for API (build 201510051707)
user.home: C:\Users\Jonathan
user.dir (work dir): C:\Users\Jonathan\Documents\NetBeansProjects\test
user.name: Jonathan
java.io.tmpdir: C:\Users\Jonathan\AppData\Local\Temp
running 64Bit on Windows (6.1) from a jar
java 7-64 version 1.7.0_79-b15 vm 24.79-b02 class 51.0 arch amd64
app data folder: C:\Users\Jonathan\AppData\Roaming\Sikulix
libs folder: C:\Users\Jonathan\AppData\Roaming\Sikulix\SikulixLibs_201510051707
executing jar: C:\Users\Jonathan\Desktop\API\sikulixapi.jar
*** classpath dump sikulix
 66: /C:/Users/Jonathan/Desktop/API/sikulixapi.jar
*** classpath dump end
* show environment end
[debug] RunTimeAPI: global init: leaving
[debug] RunTimeAPI: initAPI: entering
[debug] RunTimeAPI: initAPI: leaving
[debug] RunTimeAPI: loadLib: VisionProxy.dll
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at 
gui.RecordControlPanel.AutoLoadButtonLabelauto1Button_MousePressedEvent(RecordControlPanel.java:1029)
at gui.RecordControlPanel.access$1700(RecordControlPanel.java:64)
at gui.RecordControlPanel$12.mousePressed(RecordControlPanel.java:256)
at 
java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
at java.awt.Component.processMouseEvent(Component.java:6513)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at 
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.IllegalThreadStateException: Cannot call method from the 
event dispatcher thread
at java.awt.Robot.checkNotDispatchThread(Robot.java:580)
at 

Re: [Sikuli-driver] [Question #295025]: Unit test individual tests run successfully, but when all in one unit test work frame, random tests get failed on every run

2016-06-08 Thread Alex Lunyov
Question #295025 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295025

Status: Open => Needs information

Alex Lunyov requested more information:
Please, give some lines of your code where Find fails.

-- 
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