[Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
New question #660655 on Sikuli:
https://answers.launchpad.net/sikuli/+question/660655

Hi,

I developed a sikuli python script on linux that uses this code:

from socket import AF_INET, SOCK_DGRAM
import sys
import socket
import struct, time

host = "pool.ntp.org"
port = 123
buf = 1024
address = (host,port)
msg = '\x1b' + 47 * '\0'

# reference time (in seconds since 1900-01-01 00:00:00)
TIME1970 = 2208988800L # 1970-01-01 00:00:00

# connect to server
client = socket.socket( AF_INET, SOCK_DGRAM)
client.sendto(msg, address)
msg, address = client.recvfrom( buf )

t = struct.unpack( "!12I", msg )[10]
t -= TIME1970

current_time = time.ctime(t).replace("  "," ")


The code is working fine under linux, but if I use sikulix on windows it 
crashes with the following error:

[error] script [ Sikuli_Test_Original ] stopped with error in line 23
[error] _socket.error ( [Errno -1] Unmapped exception: 
java.util.concurrent.RejectedExecutionException: event executor terminated )
[error] --- Traceback --- error source first line: module ( function ) 
statement 359: _socket ( handle_exception ) _socket.error: [Errno -1] Unmapped 
exception: java.util.concurrent.RejectedExecutionException: event executor 
terminated
995: _socket ( sendto ) File 
"C:\Users\myuser\Documents\Sikuli\sikulix.jar\Lib\_socket.py", line 971, in 
_datagram_connect
[error] --- Traceback --- end --


Any idea why and how to fix 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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Description changed to:
Hi,

I developed a sikuli python script on linux that uses this code:

from socket import AF_INET, SOCK_DGRAM
import sys
import socket
import struct, time

host = "pool.ntp.org"
port = 123
buf = 1024
address = (host,port)
msg = '\x1b' + 47 * '\0'

# reference time (in seconds since 1900-01-01 00:00:00)
TIME1970 = 2208988800L # 1970-01-01 00:00:00

# connect to server
client = socket.socket( AF_INET, SOCK_DGRAM)
client.sendto(msg, address)
msg, address = client.recvfrom( buf )

t = struct.unpack( "!12I", msg )[10]
t -= TIME1970

current_time = time.ctime(t).replace("  "," ")


The code is working fine under linux, but if I use sikulix on windows it 
crashes (at line =>  client.sendto(msg, address)  ) with the following error:

[error] script [ Sikuli_Test_Original ] stopped with error in line 23
[error] _socket.error ( [Errno -1] Unmapped exception: 
java.util.concurrent.RejectedExecutionException: event executor terminated )
[error] --- Traceback --- error source first line: module ( function ) 
statement 359: _socket ( handle_exception ) _socket.error: [Errno -1] Unmapped 
exception: java.util.concurrent.RejectedExecutionException: event executor 
terminated
995: _socket ( sendto ) File 
"C:\Users\myuser\Documents\Sikuli\sikulix.jar\Lib\_socket.py", line 971, in 
_datagram_connect
[error] --- Traceback --- end --


Any idea why and how to fix 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


Re: [Sikuli-driver] [Question #660613]: Convert my Sikuli python script in a java (obfuscated) standalone package

2017-11-12 Thread RaiMan
Question #660613 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660613

Status: Open => Answered

RaiMan proposed the following answer:
Currently I am on holiday for 2 weeks. When I am back, I will have a
look at it. Thanks for finding the interesting post.

-- 
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 #660624]: app.focus() resulting in negative x and y values

2017-11-12 Thread RaiMan
Question #660624 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660624

Status: Open => Answered

RaiMan proposed the following answer:
Since the App features depend on many system specifics, you have to
check every result and in case react accordingly or check what went
wrong.

-- 
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 #660655]: .sendto() method does not work on windows

2017-11-12 Thread RaiMan
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Status: Open => Answered

RaiMan proposed the following answer:
You use non-Sikulix Features. Better ask on stackoverflow.com
Same Jython on both systems?
Use latest SikuliX.

-- 
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 #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Max posted a new comment:
The same code on sikulix  linux is working fine.
In both OS I have the latest sikulix.

-- 
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 #660613]: Convert my Sikuli python script in a java (obfuscated) standalone package

2017-11-12 Thread Max
Question #660613 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660613

Max posted a new comment:
Thank!

-- 
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 #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Max posted a new comment:
I think is a sikuli issue since, if I run a python script with these lines, the 
code is working properly (on windows).
>From the error logs I had the impression that sikuli tried to use its own 
>_socket.py

-- 
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 #660624]: app.focus() resulting in negative x and y values

2017-11-12 Thread Yongho Lee
Question #660624 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660624

Yongho Lee posted a new comment:
Can you elaborate?  What do you mean "check every result"? If the
coordinates of the app is what you're referring to, it results in
Region(-250, -250, 125, 125) no matter what.

Otherwise, how would I check what went wrong? Sorry, new to all this.

-- 
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 #660624]: app.focus() resulting in negative x and y values

2017-11-12 Thread Yongho Lee
Question #660624 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660624

Status: Answered => Open

Yongho Lee is still having a problem:
I also tested it out with just

def testing():
App.focus('MEmu')
print(App.focusedWindow())

testing()


and it resulted in 

R[-250,-250 125x125]@S(?) E:Y, T:3.0

So I know for sure App.focusedWinow() is returning negative coordinates.
Do you have any idea why?

-- 
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 #660624]: app.focus() resulting in negative x and y values

2017-11-12 Thread Yongho Lee
Question #660624 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660624

Status: Open => Solved

Yongho Lee confirmed that the question is solved:
Nevermind I was being retarded
spelled the name of the application wrong

-- 
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 #660671]: focusedWindow() results in inconsistent and wrong coordinates

2017-11-12 Thread Yongho Lee
New question #660671 on Sikuli:
https://answers.launchpad.net/sikuli/+question/660671

Basically what title says. When the actual location was  x = 410 and y = 182, 
it returned x =  513 and y = 227. It also got the width and the length wrong. 
If it was consistent with how much of x and how much of y it was offset by, I 
would just offset it back, but it's not consistent with that either. I've seen 
errors of anywhere from 30 to 300 pixels. Is there a fix to this, or is this a 
problem on my side?

-- 
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 #660671]: focusedWindow() results in inconsistent and wrong coordinates

2017-11-12 Thread Yongho Lee
Question #660671 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660671

Status: Open => Solved

Yongho Lee confirmed that the question is solved:
nevermind, highlight was being weird for a bit there. Restarted my
computer and things went back to normal.

-- 
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 #660506]: [1.1.x] Windows 10: latest build and Java 8: Mouse cursor is misbehaving on high resolution --- currently no solution nor workaround

2017-11-12 Thread Abhijit saxena
Question #660506 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660506

Abhijit saxena posted a new comment:
Now that's a bummer. My whole project is based on sikuli. :(
Now have to find some native python library  to run the automation.

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