Re: [Sikuli-driver] [Question #256078]: [1.0.1] OSX 10.10 Yosemite: Can't launch SikuliX IDE
Question #256078 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256078 Summary changed to: [1.0.1] OSX 10.10 Yosemite: Can't launch SikuliX IDE -- 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 #256078]: Can't launch Program in new MAC OS
Question #256078 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256078 Status: Open = Answered RaiMan proposed the following answer: Seems to be 1.0.1 Not tested yet with OSX 10.10. use in a Terminal /Applications/SikuliX-IDE.app/Contents/runIDE -d 3 -c the debug output in the terminal window might reveal more information. -- 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 1384494] Re: screen.capture capturing only Screen(0) even when multiple screens are present
upgrade to the latest 1.1.0 pre-final and try again. ** Summary changed: - screen.capture capturing only Screen(0) even when multiple screens are present + [1.1.0 Beta] screen.capture only Screen(0) in multi-monitor -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1384494 Title: [1.1.0 Beta] screen.capture only Screen(0) in multi-monitor Status in Sikuli: New Bug description: Sikuli version: 1.1.0-Beta2 I want to capture each screen separately every 2 seconds and wrote the following code to achieve it: import os import shutil import datetime screenshotsDir = rC:\Users\Sikuli\Temp\Exceptions screens = [Screen(id) for id in range(Screen().getNumberScreens())] print screens # Prints [S(0)[0,0 1920x1080] E:Y, T:3.0, S(1)[-1920,0 1920x1080] E:Y, T:3.0] print Screen().getNumberScreens() # Prints 2 while True: for _dx, screen in enumerate(screens): print screen.getBounds() # Prints java.awt.Rectangle[x=0,y=0,width=1920,height=1080] and java.awt.Rectangle[x=-1920,y=0,width=1920,height=1080] respectively img = screen.capture(screen.getBounds()) time_now = datetime.datetime.now().strftime(%H%M%S) img_target = {}.S{}.png.format(time_now, _dx) target = os.path.join(screenshotsDir, img_target) shutil.move(img, target) time.sleep(2) Unfortunately, when I go and check the screenshots, I see that Sikuli only grabbed S(0) for both monitors although the code print output gives all the right information! To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1384494/+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 #256069]: Change the DPI of the screenshots taken? --- does not make sense --- screenshots have the pixels as shown on the screen
Question #256069 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256069 Summary changed to: Change the DPI of the screenshots taken? --- does not make sense --- screenshots have the pixels as shown on the screen -- 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 #256069]: Change the DPI of the screenshots taken?
Question #256069 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256069 Status: Open = Answered RaiMan proposed the following answer: the screenshots have the pixel density of the physical screen (usually about below 100 dpi, but e.g. Mac Retina is higher). The dpi only says, how large an image consisting of pixels will look in a given rendering situation. So say your monitor settings currently is 96 dpi, then an image of 100x100 pixels will show up on the monitor as a square of about 1 inch. So when Sikuli captures an image, the image content will be exactly the pixels currently shown on the screen. So staying in the above example: - if you enlarge your capture in an image browser 6 times, you will see the pixels as little squares - take an image processing app and reprocess it to 600 dpi, then you will have an image, where now each original pixel will be a pixel square of about 6x6 pixels. how the added pixels are created depends on the processing options. - If you now look at the image in the image browser in the same size as the 6-times-enlarged situation, you will not see any pixel squares any more and the original size of your image now is a square of 6 inch. Conclusion: dpi does not matter anything in Sikuli's capturing process, since it takes the pixels as is from the screen. If you want images with a higher dpi value for whatever purposes, you have to process them with some image processor app. -- 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 1384317] Re: [RC3] Special keys don't go through VNC session
Thanks for this quick answer. FYI, links in the sikuli original github are 404, which is adding confusion to what repo is used and is obsolete... Concerning your answer, could you please give pointers in order to try the VNC solution you're talking about? -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1384317 Title: [RC3] Special keys don't go through VNC session Status in Sikuli: Won't Fix Bug description: Special keys like Key.ENTER, Key.F1, Key.BACKSPACE, etc. do not go through VNC session. To reproduce the bug : * set up a Windows Seven VM where RealVNC is installed and up (https://www.realvnc.com/download/vnc/) * run a sikuli script from a host running Debian Wheezy. The script has to open something (firefox for example) and to vncscreen.type(test+Key.ENTER) * you can check that firefox is correctly opening by the script, but only test is typed (no ENTER). Version used is the one from github (https://github.com/sikuli/sikuli) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1384317/+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 1384317] Re: [RC3] Special keys don't go through VNC session
--- links in the sikuli original github are 404 thanks for the tip - changed FYI: -- https://github.com/sikuli/sikuli no longer supported -- https://github.com/RaiMan/SikuliX-2014 actual repo for version 1.1.0 -- https://github.com/RaiMan/SikuliX-2015 prepared repo for version 1.2 --- to try the VNC solution I am talking about version 1.1.0. To understand how it works, you currently have to look into the sources (API::edu.unh.iol.dlc) I do not have any experience with it. This is the example from the contributor Michael Johnson: public static void main(String[] args){ Socket s = new Socket(192.168.1.17, 5900); //open a socket to vnc server on listening port s.setSoTimeout(1000); s.setKeepAlive(true); //some socket configuration ConnectionController cc = new ConnectionController(s); cc.openConnection(0); //opens the vnc connection for connection 0, multiple are supported cc.setPixelFormat(0, Truecolor, 32, 0); //for connection 0, set pixel data to Truecolor, 32 bits per pixel, little endian cc.start(0); //start thread that keeps BufferedImage updated by polling server for remote desktop changes Thread.sleep(2000); //wait for buffered image to be updated before we do sikuli stuff VNCScreen vnc = new VNCScreen(); //default constructor uses ConnectionController index 0 vnc.click(new Pattern(untitled.png)); //do other sikuli operations cc.closeConnection(0); //clean up socket, stop thread } --- some comments Try and catch blocks for exceptions are omitted from example. The VNC protocol supports multiple pixel formats. Currently, the VNC client code only supports truecolor, 32 bits per pixel, little endian pixel format. Depending on which VNC server you are using, it may initialize the connection with some other pixel format that is not currently supported. In this case, a message is printed to stderr saying Error: PixelFormat not supported, setPixelFormat required to let the user know. After that, the setPixelFormat line changes the connection to the format supported by the client. That line could probably be better integrated into Sikuli's logging system but I am less familiar with the details of while level would be appropriate. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1384317 Title: [RC3] Special keys don't go through VNC session Status in Sikuli: Won't Fix Bug description: Special keys like Key.ENTER, Key.F1, Key.BACKSPACE, etc. do not go through VNC session. To reproduce the bug : * set up a Windows Seven VM where RealVNC is installed and up (https://www.realvnc.com/download/vnc/) * run a sikuli script from a host running Debian Wheezy. The script has to open something (firefox for example) and to vncscreen.type(test+Key.ENTER) * you can check that firefox is correctly opening by the script, but only test is typed (no ENTER). Version used is the one from github (https://github.com/sikuli/sikuli) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1384317/+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 1384317] Re: [RC3] Special keys don't go through VNC session
OK, so I've set up a 1.1.0 version and created a new project with Eclipse. Library sikulixapi.jar works well with a simple sample. So I've taken your example above, but an Exception is caught during the instanciation of VNCScreen. Corresponding stacktrace is : Exception in thread main java.lang.ExceptionInInitializerError at VNCSikuli.main(VNCSikuli.java:30) Caused by: java.lang.NullPointerException at edu.unh.iol.dlc.VNCScreen.initScreens(VNCScreen.java:103) at edu.unh.iol.dlc.VNCScreen.clinit(VNCScreen.java:74) ... 1 more In order to reproduce this error, you can take this class : import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; import org.sikuli.script.*; import edu.unh.iol.dlc.*; public class VNCSikuli { /** * @param args */ public static void main(String[] args) { Socket sock; try { sock = new Socket(192.168.1.2, 5900); sock.setSoTimeout(1000); sock.setKeepAlive(true); //some socket configuration ConnectionController cc = new ConnectionController(sock); cc.openConnection(0); //opens the vnc connection for connection 0, multiple are supported cc.setPixelFormat(0, Truecolor, 32, 0); //for connection 0, set pixel data to Truecolor, 32 bits per pixel, little endian cc.start(0); //start thread that keeps BufferedImage updated by polling server for remote desktop changes Thread.sleep(2000); //wait for buffered image to be updated before we do sikuli stuff VNCScreen s = new VNCScreen(); //default constructor uses ConnectionController index 0 // This is not returning, exception is thrown } } Any idea where this error can come from ? ** Description changed: -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1384317 Title: [RC3] Special keys don't go through VNC session Status in Sikuli: Won't Fix Bug description: Special keys like Key.ENTER, Key.F1, Key.BACKSPACE, etc. do not go through VNC session. To reproduce the bug : * set up a Windows Seven VM where RealVNC is installed and up (https://www.realvnc.com/download/vnc/) * run a sikuli script from a host running Debian Wheezy. The script has to open something (firefox for example) and to vncscreen.type(test+Key.ENTER) * you can check that firefox is correctly opening by the script, but only test is typed (no ENTER). Version used is the one from github (https://github.com/sikuli/sikuli) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1384317/+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 #256102]: Looping entire Script X times, also repeats specific line action x times
New question #256102 on Sikuli: https://answers.launchpad.net/sikuli/+question/256102 I am using a loop (4 times for this example), and after each run through I want to know if its possible to have the script add an additional Return or type(Key.ENTER) for the number of times it runs the loop Example of code: i=1 while(i5): type(A) type(Key.ENTER) i=i+1 Example of what it'd do in Excel after four loops: A A A A What I want it to do in Excel after four loops (adds additional ENTER/RETURN at each loop): A A A A I am trying trying to explain this in the most simple way possible, I hope it makes sense but please let me know if you have any answers to what I am looking to accomplish or if you need more specifics... Thanks, -- 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 #256102]: Looping entire Script X times, also repeats specific line action x times
Question #256102 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256102 Description changed to: I am using a loop (4 times for this example), and after each run through I want to know if its possible to have the script add an additional Return or type(Key.ENTER) for the number of times it runs the loop Example of code: i=1 while(i5): type(A) type(Key.ENTER) i=i+1 Example of what it'd do in Excel after four loops: A A A A What I want it to do in Excel after four loops (adds additional ENTER/RETURN at each loop): A A A A I am trying trying to explain this in the most simple way possible, I hope it makes sense but please let me know if you have any answers to what I am looking to accomplish or if you need more specifics... Thanks, -- 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 #256102]: Looping entire Script X times, also repeats specific line action x times
Question #256102 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256102 Description changed to: I am using a loop (4 times for this example), and after each run through I want to know if its possible to have the script add an additional Return or type(Key.ENTER) for the number of times it runs the loop Example of code: i=1 while(i5): type(A) type(Key.ENTER) i=i+1 Example of what it'd do in Excel after four loops: A A A A What I want it to do in Excel after four loops (adds additional ENTER/RETURN at each loop): NOTE: it won't visually display both returns, so had to add text (.) on the double return lines A A A . . A I am trying trying to explain this in the most simple way possible, I hope it makes sense but please let me know if you have any answers to what I am looking to accomplish or if you need more specifics... Thanks, -- 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 #256102]: Looping entire Script X times, also repeats specific line action x times
Question #256102 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256102 Status: Open = Needs information RaiMan requested more information: --1 counting loops are easier this way for i in range(4): type(A) type(Key.ENTER) But be aware, I starts with 0 and stops being 3 so a print i after the loop will print 3 -- your example: let us use /n for a return/enter. This is what your loop does: A/n A/n A/n A/n where each line will be the next Excel cell below. So try again to explain, what you want to achieve using this, since your description is not clear. 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 #256102]: Looping entire Script X times, also repeats specific line action x times
Question #256102 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256102 Status: Needs information = Open Taylor gave more information on the question: Programming is not my thing, just been trying to learn things on my own...that i in range (): is much nicer, thanks for that! Let me try again to show example of output desired (explaining what I am actually trying to achieve would require a video)... Current Code Example: for i in range(4): type(A) type(Key.ENTER) This is what loop does: (using /n to visualize a return/enter) A/n A/n A/n A/n Is there a way so that each loop, it mathematically some how adds a extra type(Key.ENTER)...? So the example would look like this: (using /n to visualize a return/enter) A/n A/n/n A/n/n/n A/n/n/n/n -- 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 #256107]: Is it possible to stop an observer without an event occuring?
New question #256107 on Sikuli: https://answers.launchpad.net/sikuli/+question/256107 I'm looking to stop an observer if the event hasn't occurred by the end of the script. Depending on which project we are automation I'm looking to create several different observers to monitor the execution for certain pop-up conditions (such as the word ERROR in a status bar) that may or may not need to halt execution, and save a screen shot. In reading the docs and questions posted here it looks like the event returned from an onAppear() observer is used to stop the observer, however there is a chance the event will not occur before the script completes. Currently the observers are staying open beyond execution time. I can include a stripped-down code snippet if necessary. -- 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 #256107]: Is it possible to stop an observer without an event occuring?
Question #256107 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256107 Description changed to: I'm looking to stop an observer when the event hasn't occurred by the end of the script (or after some predetermined step is complete). Depending on which project we are automation I'm looking to create several different observers to monitor the execution for certain pop-up conditions (such as the word ERROR in a status bar) that may or may not need to halt execution, and save a screen shot. In reading the docs and questions posted here it looks like the event returned from an onAppear() observer is used to stop the observer, however there is a chance the event will not occur before the script completes. Currently the observers are staying open beyond execution time. I can include a stripped-down code snippet if necessary. -- 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 #185791]: How to run Sikuli On Virtual Machines
Question #185791 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/185791 Andy Funk posted a new comment: Hi, I just ran across SikuliX and I am having fun playing around with creating scripts in the IDE for automating tasks. I am wondering about the possibility of using this over VNC or other remote connections and although I see a lot of relevant discussion I can't find any concrete examples. I found this snippet of script on github but it doesn't seem to work in the IDE: https://github.com/sikuli/sikuli/blob/develop/README.md I get an error that the screen object has no connectVNC attribute. Is something like this still supported? I also understand that the new version has a remote server implementation in Java (previous post). Is there also an API for accessing this functionality in the scripts that I can create in the IDE? I couldn't find anything in the documentation. Or am I asking the wrong questions? Thanks! Andy -- 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 #256069]: Change the DPI of the screenshots taken? --- does not make sense --- screenshots have the pixels as shown on the screen
Question #256069 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/256069 Status: Answered = Solved Tak Eda confirmed that the question is solved: Thanks RaiMan, that solved my 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
[Sikuli-driver] [Bug 1384494] Re: [1.1.0 Beta] screen.capture only Screen(0) in multi-monitor
Hello, I faced the same issue on both these builds: http://imgur.com/a/nUvZK Did I use the right 1.1.0 pre-final build you asked me to use? -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1384494 Title: [1.1.0 Beta] screen.capture only Screen(0) in multi-monitor Status in Sikuli: New Bug description: Sikuli version: 1.1.0-Beta2 I want to capture each screen separately every 2 seconds and wrote the following code to achieve it: import os import shutil import datetime screenshotsDir = rC:\Users\Sikuli\Temp\Exceptions screens = [Screen(id) for id in range(Screen().getNumberScreens())] print screens # Prints [S(0)[0,0 1920x1080] E:Y, T:3.0, S(1)[-1920,0 1920x1080] E:Y, T:3.0] print Screen().getNumberScreens() # Prints 2 while True: for _dx, screen in enumerate(screens): print screen.getBounds() # Prints java.awt.Rectangle[x=0,y=0,width=1920,height=1080] and java.awt.Rectangle[x=-1920,y=0,width=1920,height=1080] respectively img = screen.capture(screen.getBounds()) time_now = datetime.datetime.now().strftime(%H%M%S) img_target = {}.S{}.png.format(time_now, _dx) target = os.path.join(screenshotsDir, img_target) shutil.move(img, target) time.sleep(2) Unfortunately, when I go and check the screenshots, I see that Sikuli only grabbed S(0) for both monitors although the code print output gives all the right information! To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1384494/+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