[Sikuli-driver] [Bug 878864] Re: [request] want Pattern.anySize() and Pattern.anyColor()

2014-04-08 Thread RaiMan
not in the roadmap currently.

Earliest in 2015 with 1.2+

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

Title:
  [request] want Pattern.anySize() and Pattern.anyColor()

Status in Sikuli:
  In Progress

Bug description:
  as a general solution, Sikuli needs to know, how the image should be
  rescaled.

  the same image is found in different screen resolutions by Sikuli
  though.

  --- 
  based on the original description of the planned Sikuli features:

  anySize() was supossed to solve different resolutions problems.

  But it is not yet available in Sikuli script.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/878864/+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 #246667]: how to switch between remote desktop and local machine.(for ex.copy the content from local machine excel to remote desktop excel for some iterations).

2014-04-08 Thread RaiMan
Question #246667 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246667

Status: Open = Invalid

RaiMan changed the question status:
not a Sikuli question

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246607]: sikuli in Maven Central

2014-04-08 Thread Claes Harvenberg
Question #246607 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246607

Claes Harvenberg posted a new comment:
Thanks RaiMan, I understand. I haven't uploaded anything myself to Maven
Central and it would be no good me guessing about mechanism or policy.
You'd think someone responsible for Maven Central would be happy to
answer those questions as they seem pretty straight-forward and there
must be a lot of well established patterns that cover your question
marks.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246607]: sikuli in Maven Central

2014-04-08 Thread RaiMan
Question #246607 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246607

RaiMan posted a new comment:
@ Claes
Ok, thanks.

No problem, I only took the chance to document my current status on that.
May be someone stumbles upon this entry and already has a hint on a well 
established pattern useable in this case.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246449]: Show time duration for each testcase in the report generated by HTMLTestRunner

2014-04-08 Thread Mujeebu Rahman
Question #246449 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246449

Status: Answered = Solved

Mujeebu Rahman confirmed that the question is solved:
OK Thanks RaiMan.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246667]: how to switch between remote desktop and local machine.(for ex.copy the content from local machine excel to remote desktop excel for some iterations).

2014-04-08 Thread hariprasadh
Question #246667 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246667

hariprasadh posted a new comment:
this is sikuli question.please find below the code which is used to take remote 
login by copying the  xl file to remote.
s=new Screen();
s.type(image);//if i type image in desktop,the image.xls gets 
selected
s.type(c,KeyModifier.CTRL);
//to open the remote desktop
App.open(C:\\Windows\\System32\\mstsc.exe);
App myApp = new App(mstsc) ;
s.wait(2.0);
 
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
Rectangle screenRect = new Rectangle(screenSize);
System.out.println(screenRect.getBounds());
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(screenRect);
int height=image.getHeight();
int width=image.getWidth();
BufferedImage RemoteDesktopIcon=image.getSubimage(477, 130, 414, 250);

BufferedImage TypeRDName_New1=image.getSubimage(559, 236, 243, 25);
boolean t=ImageIO.write(image, png, new 
File(C:\\Users\\hari\\Desktop\\Images\\image.png));
ImageIO.write(RemoteDesktopIcon, png, new 
File(C:\\Users\\hari\\Desktop\\Images\\RemoteDesktopIcon.png));
ImageIO.write(TypeRDName_New1, png, new 
File(C:\\Users\\hari\\Desktop\\Images\\TypeRDName_New1.png));   
Region rdi=s.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\RemoteDesktopIcon.png));
Region rditype=s.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\TypeRDName_New1.png));
rdi.click(rditype);

String pcname=PC144187;

for(int i=0;i=pcname.length();i++)
{
rdi.type(Key.BACKSPACE);
}
rdi.type(pcname);
Region connect=rdi.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\Connect.png));
System.out.println(connect.getRect());
rdi.click(connect);

Region ws=s.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\WindowsSecurity.png));
ws.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\UserAccount.png));
ws.click(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\UserAccount.png));

ws.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\UserNameRMD.png));
ws.click(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\UserNameRMD.png));
ws.type(350734);

ws.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\PasswordRMD.png));
ws.click(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\PasswordRMD.png));
ws.type(namasivaya89!);

Region rokrmd=s.find(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\OKRMD1.png));
s.click(new 
Pattern(C:\\Users\\hari\\Desktop\\Images\\OKRMD1.png));
System.out.println(OKSize+rokrmd.getRect());
s.wait(8.0);
s.type(Key.ENTER);

//after that i need code  to paste the copied file  to remote 
desktop.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246667]: how to switch between remote desktop and local machine.(for ex.copy the content from local machine excel to remote desktop excel for some iterations).

2014-04-08 Thread RaiMan
Question #246667 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246667

Status: Invalid = Open

RaiMan changed the question status:
ok

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #229069]: alternative OCR engine for sikuli

2014-04-08 Thread neogeo
Question #229069 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/229069

neogeo posted a new comment:
Hi,  all

I have tried the OCR also but results are not good enough  I have
tried..

1. on the plain text home page
2. stock price shown on a flash

is there any options/switches to fine tune the reading results for above
environment?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #229069]: alternative OCR engine for sikuli

2014-04-08 Thread RaiMan
Question #229069 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/229069

RaiMan posted a new comment:
Tesseract definitely is the best available free OCR engine.

... only the current implementation in Sikuli is still rather poor in
special situations (small or non regular fonts, numbers, low contrast,
...)

... and there are no standard tuning options in current Sikuli.

the best results with version 1.0.1 you get, if
- the image (region) has high contrast
- it is a rather normal/usual font
- the font size is 12 pixels in height
- only 1 line of text

If this is not sufficient for you, you have to use a combination of
image-processing (resize to 300 dpi equivalent, optimise contrast and
sharpness) and the tesseract command line program and run the OCR in a
subprocess (... but processing time will be 1-2 seconds depending on
implementation)

It is on the list, to improve the Tesseract implementation in Sikuli,
but I guess this will not be before version 1.2

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246688]: OCR numbers in a flash application

2014-04-08 Thread neogeo
New question #246688 on Sikuli:
https://answers.launchpad.net/sikuli/+question/246688

Hi all...

I would like to ask if Sikuli is possible to read the numbers on a flash 
application like this: 

http://i.imgur.com/CjcN9hh.jpg

Thanks a lot !



-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 1304366] [NEW] Unable to run .exe file with environment variable

2014-04-08 Thread cat123
Public bug reported:

Hi RaiMan,

I wrote a new version of my previous bug. This time I don't use the
os.environ but subprocess.call.

Thanks! I very much appreciate your helpfulness in this forum.

I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
And we don't want to change the path setting, but only run through an 
environment variable. 
I wrote the following  script, it works on python but not on sikuli. Would you 
have any alternatives\workarounds?

#MyApp environment variable is created in system in variables under 
System\Advanced Settings
# My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
#We can run the following script on Python, it's OK
#We can also run %MyApp% on command prompt, it's OK. 

from sikuli import*
import os, sys
import subprocess

os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
subprocess.call('%MyApp%', shell = True) #But we can't run it [BAD]

We have the following error message (not pasted the whole message):

'C:\2014-03-07' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
at javax.swing.text.FlowView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
at javax.swing.text.BoxView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
at javax.swing.text.BoxView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
at

** 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/1304366

Title:
  Unable to run .exe file with environment variable

Status in Sikuli:
  New

Bug description:
  Hi RaiMan,

  I wrote a new version of my previous bug. This time I don't use the
  os.environ but subprocess.call.

  Thanks! I very much appreciate your helpfulness in this forum.

  I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
  And we don't want to change the path setting, but only run through an 
environment variable. 
  I wrote the following  script, it works on python but not on sikuli. Would 
you have any alternatives\workarounds?

  #MyApp environment variable is created in system in variables under 
System\Advanced Settings
  # My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
  #We can run the following script on Python, it's OK
  #We can also run %MyApp% on command prompt, it's OK. 

  from sikuli import*
  import os, sys
  import subprocess

  os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
  subprocess.call('%MyApp%', shell = True) #But we can't run it [BAD]

  We have the following error message (not pasted the whole message):

  'C:\2014-03-07' is not recognized as an internal or external command,
  operable program or batch file.
  Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
  at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
  at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
  at javax.swing.text.FlowView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
  at

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1304366/+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 #246688]: OCR numbers in a flash application

2014-04-08 Thread RaiMan
Question #246688 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246688

Status: Open = Answered

RaiMan proposed the following answer:
No it cannot: white font on black background does not seem to work.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246693]: Unable to run .exe file with environment variable

2014-04-08 Thread RaiMan
Question #246693 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246693

RaiMan posted a new comment:
this is a question

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246693]: Unable to run .exe file with environment variable

2014-04-08 Thread RaiMan
Question #246693 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246693

Status: Open = Answered

RaiMan proposed the following answer:
With shell=True, on Windows the given command string is given to
CMD.EXE, which expects the string to be an executable command and be
quoted according to the rules of CMD.EXE.

If the executable filename contains special characters, that have a
meaning when parsing a command line - like your ( ... ) - then the
complete command has to be in double-double-quotes:

subprocess.call('%MyApp%', shell = True)

... but IMHO this should work also:

subprocess.call(os.environ[MYAPP])

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246693]: Unable to run .exe file with environment variable

2014-04-08 Thread cat123
New question #246693 on Sikuli:
https://answers.launchpad.net/sikuli/+question/246693

Hi RaiMan,

I wrote a new version of my previous bug. This time I don't use the os.environ 
but subprocess.call. 

Thanks! I very much appreciate your helpfulness in this forum.

I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
And we don't want to change the path setting, but only run through an 
environment variable. 
I wrote the following  script, it works on python but not on sikuli. Would you 
have any alternatives\workarounds?

#MyApp environment variable is created in system in variables under 
System\Advanced Settings
# My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
#We can run the following script on Python, it's OK
#We can also run %MyApp% on command prompt, it's OK. 

from sikuli import*
import os, sys
import subprocess

os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
subprocess.call('%MyApp%', shell = True) #But we can't run it [BAD]

We have the following error message (not pasted the whole message):

'C:\2014-03-07' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
at javax.swing.text.FlowView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
at javax.swing.text.BoxView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
at javax.swing.text.BoxView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
at

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 1304366] Re: Unable to run .exe file with environment variable

2014-04-08 Thread RaiMan
this is a question

** Changed in: sikuli
   Status: New = Invalid

** Converted to question:
   https://answers.launchpad.net/sikuli/+question/246693

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

Title:
  Unable to run .exe file with environment variable

Status in Sikuli:
  Invalid

Bug description:
  Hi RaiMan,

  I wrote a new version of my previous bug. This time I don't use the
  os.environ but subprocess.call.

  Thanks! I very much appreciate your helpfulness in this forum.

  I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
  And we don't want to change the path setting, but only run through an 
environment variable. 
  I wrote the following  script, it works on python but not on sikuli. Would 
you have any alternatives\workarounds?

  #MyApp environment variable is created in system in variables under 
System\Advanced Settings
  # My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
  #We can run the following script on Python, it's OK
  #We can also run %MyApp% on command prompt, it's OK. 

  from sikuli import*
  import os, sys
  import subprocess

  os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
  subprocess.call('%MyApp%', shell = True) #But we can't run it [BAD]

  We have the following error message (not pasted the whole message):

  'C:\2014-03-07' is not recognized as an internal or external command,
  operable program or batch file.
  Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
  at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
  at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
  at javax.swing.text.FlowView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
  at

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1304366/+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 1304366] Re: Unable to run .exe file with environment variable

2014-04-08 Thread RaiMan
With shell=True, on Windows the given command string is given to
CMD.EXE, which expects the string to be an executable command and be
quoted according to the rules of CMD.EXE.

If the executable filename contains special characters, that have a
meaning when parsing a command line - like your (  ... ) - then the
complete command has to be in double-double-quotes:

subprocess.call('%MyApp%', shell = True)

... but IMHO this should work also:

subprocess.call(os.environ[MYAPP])

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

Title:
  Unable to run .exe file with environment variable

Status in Sikuli:
  Invalid

Bug description:
  Hi RaiMan,

  I wrote a new version of my previous bug. This time I don't use the
  os.environ but subprocess.call.

  Thanks! I very much appreciate your helpfulness in this forum.

  I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
  And we don't want to change the path setting, but only run through an 
environment variable. 
  I wrote the following  script, it works on python but not on sikuli. Would 
you have any alternatives\workarounds?

  #MyApp environment variable is created in system in variables under 
System\Advanced Settings
  # My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
  #We can run the following script on Python, it's OK
  #We can also run %MyApp% on command prompt, it's OK. 

  from sikuli import*
  import os, sys
  import subprocess

  os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
  subprocess.call('%MyApp%', shell = True) #But we can't run it [BAD]

  We have the following error message (not pasted the whole message):

  'C:\2014-03-07' is not recognized as an internal or external command,
  operable program or batch file.
  Exception in thread AWT-EventQueue-0 java.lang.NullPointerException
  at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
  at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
  at javax.swing.text.FlowView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
  at

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1304366/+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 #246694]: Sikuli with Selenium Java

2014-04-08 Thread Atul Mirvankar
New question #246694 on Sikuli:
https://answers.launchpad.net/sikuli/+question/246694

I have successfully able to configure Sikuli with Selenium Web Driver. When I 
tried to automate calculator I was  properly able to open calculator and click 
on the buttons. 

However, when I am not able to validate the value in textbox of calculator.

Below is my code:

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import org.sikuli.script.*;
import org.sikuli.script.internal.hotkey.*;
import org.sikuli.script.natives.*;
import org.testng.internal.PropertiesFile;

public class SikuliTest {


public static void main(String[] args) throws IOException, FindFailed, 
InterruptedException {
Properties deskIcon = new Properties();
deskIcon.load(new 
FileInputStream(D:\\SeleniumPractice\\WebandDesk\\OR\\PropertyFiles\\DeskIcons.properties));

Screen scrn = new Screen();

App.open(calc.exe);

scrn.click(deskIcon.getProperty(Calc1), 100);
scrn.click(deskIcon.getProperty(Calc0), 100);
scrn.click(deskIcon.getProperty(Calc0), 100);

scrn.click(deskIcon.getProperty(CalcPlus), 200);

scrn.click(deskIcon.getProperty(Calc1), 100);
scrn.click(deskIcon.getProperty(Calc0), 100);
scrn.click(deskIcon.getProperty(Calc0), 100);

scrn.click(deskIcon.getProperty(CalcEqul), 200);

if (deskIcon.getProperty(Calc_Scrn).contains(200)){
System.out.println(Pass);
}
else{
System.out.println(Fail);
}
  }
}

The if condition is not working properly. It's not validating the value in 
textbox image (Calc_Scrn).

Please suggest how we can validate it.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246694]: Sikuli with Selenium Java

2014-04-08 Thread RaiMan
Question #246694 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246694

Status: Open = Needs information

RaiMan requested more information:
The API you are using is not SikuliX.

The imports seem to reference some RC3 stuff (sikuli-script.jar ??).

Version 1.0.1 does not have:
org.sikuli.script.internal.hotkey.*;
org.sikuli.script.natives.*;

the click function for RC3 reads
scrn.click(some_image)

... so what should click(some_image, 100) mean?

SikuliX has OCR based on Tesseract with the usage:
String text = some_region.text()

but I think the calculator numbers are not OCR-readable.

SikuliX does not know a feature:
deskIcon.getProperty(Calc_Scrn).contains(200)

Taking your systematic, the deskIcon.getProperty(Calc_Scrn) should
return an image-file-name-string, that I doubt contains 200, so this
should always be false.

So where did you get your Sikuli-API-ideas ???

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246723]: Termination an application completely when multiple windows within the appliation is open

2014-04-08 Thread bgbig
New question #246723 on Sikuli:
https://answers.launchpad.net/sikuli/+question/246723

I am currently automating various tasks in Microsoft's System Center 
Configuration Manager 2012.

It is obvious that the application is heavy and to perform a test case 
automation multiple windows needs to be open within the application ,for e.g to 
validate IP range it opens up a window and to perform check it pops up messages 
like 'valid IP range' or 'invalid IP range' .
So a total of three pop ups will occur in this case.

Now, if the validation fails at any point .I may need to close SCCM window 
itself. i.e, all three pop up windows and the complete application.
Its just like restarting SCCM once again and performing the needful .I need to 
implement this functionality in except block of my code.
Is there any way I can close multiple windows within an application and restart 
in case of failure.

One probable solution I figured out is to kill the process from task 
manager,but I want an alternative to this problem.

Thanks in advance  

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #246501]: How to make sikuli find image for a new search?

2014-04-08 Thread Diana
Question #246501 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246501

Status: Answered = Open

Diana is still having a problem:
Please see my code:
dic={'d1':'name1','d2':'name2'}
for d,t in dic.iteritems():
 click(match)
 paste(t)
 click(d)
 click(add)

when add a new item, match textbox is changed the position, but each
time, sikuli always click the same position for match.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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