[Sikuli-driver] [Bug 1793408] [NEW] popFile on Win10 only allows sikuli folders to be seleted

2018-09-19 Thread Ryan
Public bug reported:

When I write a Sikuli script to open a dialog to let me choose a folder
location, the IDE will only allow me to choose a sikuli folder.

This is my script:
--
test = popFile("Choose a folder")

print(test)
--


REPRO:


1.  Load Sikuli 1.1.4 (2018-09-19_07:17) onto a Win 10 64bit machine
2.  Download the Jython-standalone-2.7.0.JAR and place it in the 
AppData/Roaming/Sikulix/Extensions folder
  (unsure if this is needed)
3.  Open Sikuli and write a script as described above

RESULT:

Selecting a non-sikuli folder pops a message saying 'This is not a valid
sikuli script'.

EXPECTED:

The user would be able to select any folder

** Affects: sikuli
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1793408

Title:
  popFile on Win10 only allows sikuli folders to be seleted

Status in Sikuli:
  New

Bug description:
  When I write a Sikuli script to open a dialog to let me choose a
  folder location, the IDE will only allow me to choose a sikuli folder.

  This is my script:
  --
  test = popFile("Choose a folder")

  print(test)
  --

  
  REPRO:

  
  1.  Load Sikuli 1.1.4 (2018-09-19_07:17) onto a Win 10 64bit machine
  2.  Download the Jython-standalone-2.7.0.JAR and place it in the 
AppData/Roaming/Sikulix/Extensions folder
(unsure if this is needed)
  3.  Open Sikuli and write a script as described above

  RESULT:

  Selecting a non-sikuli folder pops a message saying 'This is not a
  valid sikuli script'.

  EXPECTED:

  The user would be able to select any folder

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1793408/+subscriptions

___
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] [Bug 1793408] Re: popFile on Win10 only allows sikuli folders to be seleted

2018-09-19 Thread Ryan
Digging through the Answers backlog, I found a question that was solved
back in 2016:

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

I didn't see a related bug to re-open.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1793408

Title:
  popFile on Win10 only allows sikuli folders to be seleted

Status in Sikuli:
  New

Bug description:
  When I write a Sikuli script to open a dialog to let me choose a
  folder location, the IDE will only allow me to choose a sikuli folder.

  This is my script:
  --
  test = popFile("Choose a folder")

  print(test)
  --

  
  REPRO:

  
  1.  Load Sikuli 1.1.4 (2018-09-19_07:17) onto a Win 10 64bit machine
  2.  Download the Jython-standalone-2.7.0.JAR and place it in the 
AppData/Roaming/Sikulix/Extensions folder
(unsure if this is needed)
  3.  Open Sikuli and write a script as described above

  RESULT:

  Selecting a non-sikuli folder pops a message saying 'This is not a
  valid sikuli script'.

  EXPECTED:

  The user would be able to select any folder

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1793408/+subscriptions

___
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 #674152]: Detect VNC disconnect

2018-09-19 Thread Dillon
Question #674152 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674152

Dillon gave more information on the question:
I do have a function that can be used to keep retrying to reconnect to
VNC in the event that the server is still powered off, but this still
requires a hard coded time to wait for the server to power off and power
back on.

def restartVNC(reg, ip_, port_, password_, time):
reg.stop()
log("Reconnecting to VNC connection after {0} seconds.".format(time))
wait_(time)
while(True):
try:
reg = vncStart(ip = ip_, port = int(port_), password = 
password_, connectionTimeout = 10, timeout = 1000)
except:
pass
if reg:
log("VNC connection reestablished.")
break
return reg

-- 
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 #674152]: Detect VNC disconnect

2018-09-19 Thread Dillon
New question #674152 on Sikuli:
https://answers.launchpad.net/sikuli/+question/674152

I am trying to detect when a VNC connection is stopped.

I have a script that runs an installer that requires the machine to be 
restarted during the installation. Currently, I have a wait function that waits 
for 5 minutes. Normally my machine starts up within 2 minutes but in the off 
chance that a VM I'm running needs something such as Windows Updates, it causes 
the restart to be longer, hence the 5 minute wait. What I'm looking to do is 
detect when the machine is turned off and then back on, rather than waiting for 
a hardcoded 5 minutes.

When the machine is turned off that I am connected to, I get a java exception 
that spams in the console. I can't catch because it isn't generated directly 
from the scripts code, rather from the VNC connection being halted.

Any insight around this topic would be greatly appreciated.

-- 
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] [Bug 1793035] Re: [1.1.4] RobotFramework: scripts not embedding screenshot into log --- needs robot 3.0.4 --- fixed 2018-09-19

2018-09-19 Thread Ryan
Deleted the entire Sikuli folder in AppData, the JAR file of the
previous build and also uninstalled RF through pip.

I downloaded and tested build # 2018-09-19_07:17.  Images are now
embedding in the log file!  Thanks for the quick turn-around :D

One note, I kept seeing this error ('No installed runner supports
(text/python) Trying to run the script will crash the IDE!') when
starting Sikuli and loading up my previous script until I downloaded a
JAR distribution of Jython-2.7 and put it in the Extensions folder.  To
be fair, I apparently uninstalled my Jython installation previously, so
that may be the reason for seeing this error.  I am mainly mentioning
this since I am not sure if this is correct behavior or not.

If not, I can open another issue about it.

Regardless, the image embedding issue is fixed with this new build.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1793035

Title:
  [1.1.4] RobotFramework: scripts not embedding screenshot into log ---
  needs robot 3.0.4 --- fixed 2018-09-19

Status in Sikuli:
  Fix Committed

Bug description:
  Hello,

  I have been using Sikuli 1.1.4 (2019-09-12_07-01) with the
  robotframework-3.0.4 JAR distribution to add screenshots to my log
  files for visual verification.  I have been unable to have the
  screenshot added to the log when I run the script through the Sikuli
  IDE.

  However, running the same script, I have been able to have the
  screenshot correctly embedded with both RF (normal installation) as
  well as running the RF JAR distributable - same distributable I am
  running with the Sikuli IDE - from the commandline.

  Here is the what I am using to run via the command line:  java -jar
  C:\Users\[user]\AppData\Roaming\Sikulix\Extensions\robotframework-3.0.4.jar
  C:\Users\[user]\Desktop\test2.sikuli.robot

  This is my simple RF script I am running from Sikuli:

  runScript("""
  robot

  *** Settings ***
  Library   Screenshot

  *** Test Cases ***
  Try to take a screenshot
 Take Screenshot   mypic   80%

  """)


  REPRO:

  1.  Load Sikuli 1.1.4 (2019-09-12_07-01) onto a Win10 64bit machine
  2.  Download robotframework-3.0.4.JAR and place it in 
C:\Users\[user]\AppData\Roaming\Sikulix\Extensions
  3.  Open Sikuli and write a script as described above
  4.  Run the script

  RESULT:

  All expected logs/reports/images are created, but the jpg is not
  embedded in the log.html file.

  EXPECTED:

  img is embedded in the log file

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1793035/+subscriptions

___
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 #674145]: What is the correct way to click on drop-down menus that highlight?

2018-09-19 Thread Paul Chambre
Question #674145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674145

Paul Chambre gave more information on the question:
With this code:

appWindow.hover(OpenNotebook);
appWindow.click();
Debug.action("Clicked OpenNotebook.");
try {
appWindow.wait(NotebookOpenDialog, 2);
} catch (FindFailed reclick) {
Debug.action("Initial Open Notebook click failed.");
try {
appWindow.wait(HighlightedOpenNotebook, 1);
Debug.action("Clicking highlighted menu item");
appWindow.click(HighlightedOpenNotebook);
} catch (FindFailed ignored) {
Debug.action("Re-clicking menu item.");
appWindow.click(MoreActions);
// Hover, then click, since hovering will cause the menu item to 
highlight, and that seemed to cause a race where it wouldn't always click
appWindow.hover(OpenNotebook);
appWindow.click();
}
}

I get this in my log:

[log] CLICK on L(1633,600)@S(0)[0,0 1920x1080] (595 msec)
[log] Clicked OpenNotebook.
[log] Initial Open Notebook click failed.
[log] Clicking highlighted menu item
[log] CLICK on L(1640,600)@S(0)[0,0 1920x1080] (594 msec)

-- 
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 #674145]: What is the correct way to click on drop-down menus that highlight?

2018-09-19 Thread Paul Chambre
Question #674145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674145

Status: Answered => Open

Paul Chambre is still having a problem:
Just tried it. It did not work. The mouse moved to the menu item, but
the application did not respond to the click.

-- 
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 #674146]: Why am I seeing different behavior from wait() and exists()?

2018-09-19 Thread Paul Chambre
Question #674146 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674146

Linked to bug: #877450
https://bugs.launchpad.net/bugs/877450
"X-1.0rc3: pattern.exact() fails even when a perfect match exists --- 
workaround"

-- 
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 #674145]: What is the correct way to click on drop-down menus that highlight?

2018-09-19 Thread Paul Chambre
Question #674145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674145

Paul Chambre posted a new comment:
I've tried a number of variants. Pretty sure that's one of them. I'll
try it again, though, to be sure.

-- 
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 #674146]: Why am I seeing different behavior from wait() and exists()?

2018-09-19 Thread Paul Chambre
Question #674146 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674146

Description changed to:
I found this old (solved) bug that sounds similar to what I'm seeing
here: https://bugs.launchpad.net/sikuli/+bug/877450

In the old bug, find() was not finding matches with exact() but would
match with similarity=0.99. This was with truly exact images to match.

I'm wondering whether that fix is effective for exists() or only for
wait()/find()?

I'm running SikuliX 1.1.3, and seeing behavior where wait() with an
exact() Pattern matches, but exists() fails for the same exact()
Pattern. exists() with a similarity of .99, though, does find the match.

Thanks,
Paul

-- 
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 #674146]: Why am I seeing different behavior from wait() and exists()?

2018-09-19 Thread Paul Chambre
New question #674146 on Sikuli:
https://answers.launchpad.net/sikuli/+question/674146

I found this old (solved) bug that sounds similar to what I'm seeing here: 
https://bugs.launchpad.net/sikuli/+bug/877450

In the old bug, find() was not finding matches with exact() but would match 
with similarity=0.99. This was with truly exact images to match.

I'm wondering whether that fix effective for exists() or only for wait()/find()?

I'm running SikuliX 1.1.3, and seeing behavior where wait() with an exact() 
Pattern matches, but exists() fails for the same exact() Pattern. exists() with 
a similarity of .99, though, does find the match.

Thanks,
Paul

-- 
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 #674145]: What is the correct way to click on drop-down menus that highlight?

2018-09-19 Thread RaiMan
Question #674145 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674145

Status: Open => Answered

RaiMan proposed the following answer:
No need to do that:

appWindow.hover(OpenNotebook);
appWindow.click(HighlightedOpenNotebook);

Just click, where you are after the hover ;-)

so:
appWindow.hover(OpenNotebook);
appWindow.click(); # clicks the last match in region appWindow

or so:
appWindow.hover(OpenNotebook);
click(Mouse.at()) # click, where the mouse is

-- 
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 #674145]: What is the correct way to click on drop-down menus that highlight?

2018-09-19 Thread Paul Chambre
New question #674145 on Sikuli:
https://answers.launchpad.net/sikuli/+question/674145

In my test application, I have a drop-down menu whose entries highlight when 
the mouse pointer is over them. This seems to give Sikuli some difficulties. 
i.e. Sikuli can find the menu item, but the highlighting seems to sometimes 
make it lose it before it can click.

I think there may also be difficulties being caused by some Swing event timing 
issues. 

This code works reliably, but I'd like to know if there is a more elegant way 
to do this that is as reliable.

// Hover, then click, since hovering will cause the menu item to 
highlight, and that seemed to cause a race where it wouldn't always click
appWindow.hover(OpenNotebook);
appWindow.click(HighlightedOpenNotebook);
Debug.action("Clicked OpenNotebook.");
try {
appWindow.wait(NotebookOpenDialog, 2);
} catch (FindFailed reclick) {
Debug.action("Initial Open Notebook click failed.");
try {
appWindow.wait(HighlightedOpenNotebook, 1);
appWindow.click(HighlightedOpenNotebook);
} catch (FindFailed ignored) {
appWindow.click(MoreActions);
// Hover, then click, since hovering will cause the menu item 
to highlight, and that seemed to cause a race where it wouldn't always click
appWindow.hover(OpenNotebook);
appWindow.click(HighlightedOpenNotebook);
}
}


Even with this hover on the unhighlighted menu item and clicking on the 
highlighted one, I see the initial click fail about 1 in 10 times, and fall 
through to the retry.

-- 
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] [Bug 877450] Re: X-1.0rc3: pattern.exact() fails even when a perfect match exists --- workaround

2018-09-19 Thread Paul Chambre
Is this fix effective for exists() or only for wait()/find()?

I'm running SikuliX 1.1.3, and seeing behavior where wait() with an
exact() Pattern matches, but exists() fails for the same exact()
Pattern. exists() with a similarity of .99, though, does find the match.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/877450

Title:
  X-1.0rc3: pattern.exact() fails even when a perfect match exists ---
  workaround

Status in Sikuli:
  Fix Released

Bug description:
  * workaround

  use Pattern.similar(0.99)

  --

  I am currently using the java Sikuli to verify generated images on the
  screen, and I need to verify that they are a 100% match (for
  regression testing). I was using the following code the verify:

  Pattern exactMatch = new pattern(pathToMasterImage).exact();
  boolean result = screen.exists(exactMatch, someTimeout) != null;

  however, on some images, this would fail. I captured screenshots on
  the failure and compare the pixels and they were an exact match. I
  also called a search for the same image immediately after using
  .similar() and gave it a minimum of a 0% match, which returned a match
  object with a score of 1.0, so there did exist a 100% match on the
  screen, but the search for the pattern with a .exact() setting seemed
  to still fail.

  Currently running the java portion of sikuli Sikuli-X-1.0rc3 (r905) 32
  bit on a win64 system (running 32bit java though) and windows7. Repro
  for this bug is difficult, but I ran it over a series of images, and
  roughly 1 in 6 seemed to fail, albeit it was different images that
  failed (on the same set of images) every time I ran it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/877450/+subscriptions

___
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 #674142]: IDE vs. commandline: Java look and feel inconsistent --- try with 1.1.4

2018-09-19 Thread RaiMan
Question #674142 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674142

Summary changed to:
IDE vs. commandline: Java look and feel inconsistent --- try with 1.1.4

-- 
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 #674142]: Java look and feel inconsistent

2018-09-19 Thread RaiMan
Question #674142 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674142

Status: Open => Answered

RaiMan proposed the following answer:
Apparently you are using an older version of SikuliX.

In the current version in both cases (starting the SikuliX IDE GUI or
running a script from commandline)

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
(org.sikuli.ide.Sikulix::prepareMac())

is only used once and only on Mac systems (I doubt, it is necessary at
all ;-)

So you might test with the new 1.1.4.

If this does not help, the only way to get it right for you, is to run your 
scripts using Jython directly from commandline and  have sikulixapi.jar on Java 
classpath.
... but the convenience 
(https://github.com/RaiMan/SikuliX-2014/wiki/Jython-in-IDEs-like-Eclipse-or-running-it-from-commandline)
 does only work up to Java 8.

With Java 9+ you have to find your own way.

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread Adrian Zieliński
Question #674136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674136

Adrian Zieliński posted a new comment:
Hi,

Probably I found solution :P I've just break loop in wrong moment :P

Here it is:
for n in range(20):
type (Key.F6, KeyModifier.SHIFT)
wait(2)
if exists("1537372097090-1.png",2):
find("1537372638707.png").click()
break
for n in range(4):
type(Key.TAB)
type(Key.ENTER)
x=0
y=+16
mouseMove(x,y)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
wait(1)

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread Adrian Zieliński
Question #674136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674136

Adrian Zieliński posted a new comment:
Hi,

you mean sth like this:

while True:
if not exists("1537362590995.png"):
for n in range(10):
 

?

I tried this but without results :(

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread masuo
Question #674136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674136

masuo proposed the following answer:
If exists() returns True, there seem to be images similar to 
"1537362590995.png" on the screen.
Since the minimum similarity is 70% in default, change the minimum similarity 
to a value greater than 70%.
https://sikulix-2014.readthedocs.io/en/latest/pattern.html?#Pattern.similar

[example]
exists(Pattern("1537362590995.png").similar(0.90))

-- 
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 #674142]: Java look and feel inconsistent

2018-09-19 Thread Samuel Norman
New question #674142 on Sikuli:
https://answers.launchpad.net/sikuli/+question/674142

When running a sikuli file from the IDE it defaults to the system look and feel:

SikuliIDE.java line 964: 
"UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());"

But when I run a sikuli file from the command line the look and feel is set to 
"javax.swing.plaf.metal.MetalLookAndFeel."

I use java GUIs that are kicked off by the sikuli script and this causes issues 
with the consistency of finding and working with the displays. 

I know I can change the look and feel in my java GUIs, but is there a way to 
set the look and feel from the sikuli script itself so it can be an umbrella 
and change everything at once?

My current solution is convoluted, I run a java script at the beginning of the 
sikuli script that changes the look and feel. But I'm looking for a more 
elegant and easier to maintain solution.

-- 
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 #674014]: [1.1.3] game needs administrator rights

2018-09-19 Thread Jitendra patel
Question #674014 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674014

Jitendra patel proposed the following answer:
if you use the console you can also right click runsikulix.cmd and
select run as administrator. This will allow you to open and run any
script as admin

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread Jitendra patel
Question #674136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674136

Status: Open => Answered

Jitendra patel proposed the following answer:
there maybe a slight delay between the last action and the image showing 
try  if not exists("1537362590995.png"):
this will wait the default 3 seconds to see if the image appears

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread Adrian Zieliński
Question #674136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/674136

Adrian Zieliński posted a new comment:
I also tried sth like below:

while True:
if not exists("1537362590995.png",0):
for n in range(10):
type(Key.F6, KeyModifier.SHIFT)
wait(2)
for n in range(4):
type(Key.TAB)
type(Key.ENTER)
x=0
y=+16
mouseMove(x,y)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
wait(1)
else:
wait(1)
break

Now, no warn statements inside debug console was showed, loop works but
no break when img ("1537362590995.png",0): will show.

-- 
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 #674136]: Loop break by if exists ("path to image") not work :(

2018-09-19 Thread Adrian Zieliński
New question #674136 on Sikuli:
https://answers.launchpad.net/sikuli/+question/674136

Hi all!

I have sth like below:

for n in range(10):
type (Key.F6, KeyModifier.SHIFT)
wait(2)
for n in range(4):
type(Key.TAB)
type(Key.ENTER)
x=0
y=+16
mouseMove(x,y)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
wait(1)
if exists(Region(86,355,431,144)):
find("1537344880118.png").click()
break;

Without "if exists" it works perfect. But problem is that i not always have the 
same number of area which should be marked. So I want stop loop when message 
about missing area will show inside program.

I have such warn statement:

[error] script [ LOOP01 ] stopped with error at line --unknown--
[error] Error caused by: IndentationError: ('unindent does not match any outer 
indentation level', 
('C:\\Users\\ZIELIN~1\\AppData\\Local\\Temp\\Sikulix_487760013\\sikuli-4482208172387115684.py',
 15, 4, ' if exists(Region(86,355,431,144)):\n')) 

Any advice?


-- 
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] [Bug 1789569] Re: [1.1.4] IDE: load() does not seem to work anymore --- fixed 2018-09-19

2018-09-19 Thread RaiMan
** Summary changed:

- [1.1.4] IDE: load() does not seem to work anymore --- workaround
+ [1.1.4] IDE: load() does not seem to work anymore --- fixed 2018-09-19

** Changed in: sikuli
   Status: In Progress => Fix Committed

** Summary changed:

- [1.1.4] IDE: load() does not seem to work anymore --- fixed 2018-09-19
+ [1.1.4] IDE: load() does not seem to work anymore --- partly fixed 2018-09-19

** Description changed:

- *** workaround
+ *** workaround --- needed if one gets not-found errors on
+ Java stuff (which should be found via Java classpath)
+ 
  comment out the load() ...
  
  ... and try the following:
- copy the jar instead to the /Sikulix/Extensions folder (where the 
jython jar is also) 
+ copy the jar instead to the /Sikulix/Extensions folder (where the 
jython jar is also)
  
  This should auto load the jar to the Java class path at start up of the
  IDE, so it should be found later.
  
  ---
  
  OS: Windows 10
  SQL Server:  2012
  Utilizing zxJDBC (ziclix)
  Driver: Microsoft JDBC driver 7.0 for SQL Server (obtained here):
  (https://www.microsoft.com/en-us/download/details.aspx?id=57175)
  
  With the script that I built in SIkuliX 1.1.2, I can successfully connect to 
our SQL Server and insert/update records.
  My script also works well in SikuliX 1.1.3.
  
  However, when I try to run the script in SikuliX 1.1.4, I receive this error:
  "driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] not found"
  
  It's the same exact script, just running in 1.1.4 instead of 1.1.3.
  
  The code that I am using to connect to SQL can be viewed in my post here:
  https://answers.launchpad.net/sikuli/+question/672153
  
  Is this a bug, or do I need to load the SQL Driver differently in 1.1.4
  than I do in 1.1.2 & 3?
  
  Thanks!
  
  Ron Turrentine

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1789569

Title:
  [1.1.4] IDE: load() does not seem to work anymore --- partly fixed
  2018-09-19

Status in Sikuli:
  Fix Committed

Bug description:
  *** workaround --- needed if one gets not-found errors on
  Java stuff (which should be found via Java classpath)

  comment out the load() ...

  ... and try the following:
  copy the jar instead to the /Sikulix/Extensions folder (where the 
jython jar is also)

  This should auto load the jar to the Java class path at start up of
  the IDE, so it should be found later.

  ---

  OS: Windows 10
  SQL Server:  2012
  Utilizing zxJDBC (ziclix)
  Driver: Microsoft JDBC driver 7.0 for SQL Server (obtained here):
  (https://www.microsoft.com/en-us/download/details.aspx?id=57175)

  With the script that I built in SIkuliX 1.1.2, I can successfully connect to 
our SQL Server and insert/update records.
  My script also works well in SikuliX 1.1.3.

  However, when I try to run the script in SikuliX 1.1.4, I receive this error:
  "driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] not found"

  It's the same exact script, just running in 1.1.4 instead of 1.1.3.

  The code that I am using to connect to SQL can be viewed in my post here:
  https://answers.launchpad.net/sikuli/+question/672153

  Is this a bug, or do I need to load the SQL Driver differently in
  1.1.4 than I do in 1.1.2 & 3?

  Thanks!

  Ron Turrentine

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1789569/+subscriptions

___
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 #673053]: Status of bug #1789569 changed to 'Fix Committed' in Sikuli

2018-09-19 Thread RaiMan
Bug #1789569 status changed in Sikuli:

In Progress => Fix Committed

https://bugs.launchpad.net/sikuli/+bug/1789569
"[1.1.4] IDE: load() does not seem to work anymore --- fixed 2018-09-19"

This bug is linked to #673053.
[1.1.4] IDE: load() does not seem to work anymore 
https://answers.launchpad.net/sikuli/+question/673053

-- 
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] [Bug 1793035] Re: [1.1.4] RobotFramework: scripts not embedding screenshot into log

2018-09-19 Thread RaiMan
Please test with the build from today.

Take care, that your modifications are removed from the SikuliX
environment.

** Changed in: sikuli
   Importance: Medium => Critical

** Summary changed:

- [1.1.4] RobotFramework: scripts not embedding screenshot into log
+ [1.1.4] RobotFramework: scripts not embedding screenshot into log --- needs 
robot 3.0.4 --- fixed 2018-09-19

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1793035

Title:
  [1.1.4] RobotFramework: scripts not embedding screenshot into log ---
  needs robot 3.0.4 --- fixed 2018-09-19

Status in Sikuli:
  Fix Committed

Bug description:
  Hello,

  I have been using Sikuli 1.1.4 (2019-09-12_07-01) with the
  robotframework-3.0.4 JAR distribution to add screenshots to my log
  files for visual verification.  I have been unable to have the
  screenshot added to the log when I run the script through the Sikuli
  IDE.

  However, running the same script, I have been able to have the
  screenshot correctly embedded with both RF (normal installation) as
  well as running the RF JAR distributable - same distributable I am
  running with the Sikuli IDE - from the commandline.

  Here is the what I am using to run via the command line:  java -jar
  C:\Users\[user]\AppData\Roaming\Sikulix\Extensions\robotframework-3.0.4.jar
  C:\Users\[user]\Desktop\test2.sikuli.robot

  This is my simple RF script I am running from Sikuli:

  runScript("""
  robot

  *** Settings ***
  Library   Screenshot

  *** Test Cases ***
  Try to take a screenshot
 Take Screenshot   mypic   80%

  """)


  REPRO:

  1.  Load Sikuli 1.1.4 (2019-09-12_07-01) onto a Win10 64bit machine
  2.  Download robotframework-3.0.4.JAR and place it in 
C:\Users\[user]\AppData\Roaming\Sikulix\Extensions
  3.  Open Sikuli and write a script as described above
  4.  Run the script

  RESULT:

  All expected logs/reports/images are created, but the jpg is not
  embedded in the log.html file.

  EXPECTED:

  img is embedded in the log file

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1793035/+subscriptions

___
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