[Sikuli-driver] [Question #240347]: Eclipse Jython Code Completion not working for Sikuli 1.0.1
New question #240347 on Sikuli: https://answers.launchpad.net/sikuli/+question/240347 I have set up Eclipse (Kepler SR1) to use Jython (2.5.2) via PyDev (3.0.0.201311051910) on Windows XP. I have: - dowloaded 'sikuli-setup.jar' into an empty 'C:\SikuliX' folder. - extracted 'Sukuli-1.0.1-Offline-Setup-IDE-option1.zip' and 'Sukuli-1.0.1-Offline-Setup-Java-option3-option4.zip' into 'C:\SikuliX\Downloads' using 7zip - run 'sikuli-setup.jar' followed by 'runSetup.cmd' and selected packs 1 and 3, and it has claimed 'Setup: Sikuli seems to work! Have fun' Following 'https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming', within Eclipse I have: - created a new project with a simple 'main.py' module - added 'C:\SikuliX\sikuli-java.jar' to Project - Properties - PyDev - PYTHONPATH - External Libraries - added 'C:\SikuliX\libs\Lib' to Project - Properties - PyDev - PYTHONPATH - External Libraries (I had to create the empty Lib folder manually because it did not exist) - clicked 'Force restore internal info' - added 'import org.sikuli.basics.SikuliXforJython' and 'from sikuli import *' to my main.py - run my project - it OVERWROTE (*not* appended) my path with 'C:\SikuliX\libs' (but that's another issue) - logged out and logged in again - run my project - it ran successfully I added a popup to my main.py: import org.sikuli.basics.SikuliXforJython from sikuli import * def run_test(): popup(msg=Hi, title=Title) print Hello, World! if __name__ == __main__: run_test() This runs successfully, and the popup appears as expected. So, the problem: Code completion does not work. 'popup()' is not recognised by the IDE. I *can* get 'popup' to be recognised by adding 'from Lib.sikuli.Sikuli import popup', but then the progam doesn't run because 'Lib' is not recognised at runtime. What am I missing? According to the article linked to above I should not need to unjar anything to get code completion to work, but there is nothing in libs/Lib for the IDE to use... In case it helps, the current file structure within C:\SikuliX: - Downloads\ - 1.0.1-1.jar - 1.0.1-3.jar - 1.0.1-9.jar - The 'zip's and 'readme's - libs\ - various .dlls and MadeForSikuliX32W.txt, and an empty 'Lib\' folder that I created - runIDE.cmd - runSetup.cmd - sikuli-ide.jar - sikuli-java.jar - sikuli-setup.jar - SikuliX-1.0.1-SetupLog.txt -- 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 #240347]: Eclipse Jython Code Completion not working for Sikuli 1.0.1
Question #240347 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/240347 Status: Open = Answered RaiMan proposed the following answer: Wooow, what a complete description! Everything is as it should be, but there is a glitch in 1.0.1: at setup time, the libs folder is created, but the Lib folder is not. Since nothing changed, the libs folder is not recreated at runtime when using sikuli-java.jar and hence no Lib folder. Just delete the libs folder and do nothing else than run again. Since now the libs folder is missing, it will be recreated at runtime, but now including the Lib folder. --- you say: it OVERWROTE (*not* appended) my path with 'C:\SikuliX\libs' That should not be. I will check it and fix it if necessary. I guess you know the workaround: just add C:\SikuliX\libs yourself before running Sikuli stuff. 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 #240347]: Eclipse Jython Code Completion not working for Sikuli 1.0.1 --- for one time delete the libs folder to force recreation
Question #240347 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/240347 Assignee: None = RaiMan Summary changed to: Eclipse Jython Code Completion not working for Sikuli 1.0.1 --- for one time delete the libs folder to force recreation -- 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 #240347]: Eclipse Jython Code Completion not working for Sikuli 1.0.1 --- for one time delete the libs folder to force recreation
Question #240347 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/240347 Tetburr posted a new comment: I should add: Once everything is setup as above (including the newly generated Libs directory) the script still ran successfully, but the following errors appeared on the Console: [error] Sikuli Jython API already on sys.path, but not from sikuli-basics.jar [error] Found here: C:\SikuliX\libs\Lib\sikuli\Sikuli.py Also, Code Completion still seemed a little confused. Once I commented out 'import org.sikuli.basics.SikuliXforJython', leaving just 'from sikuli import *', the script ran without any errors reported and COde Completion seems much happier. Perhaps the new setup does not require 'import org.sikuli.basics.SikuliXforJython' before 'from sikuli import *'? Still, everything now seems to work as expected, so thank you for your quick response. -- 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 #240347]: Eclipse Jython Code Completion not working for Sikuli 1.0.1 --- for one time delete the libs folder to force recreation
Question #240347 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/240347 Status: Answered = Solved Tetburr 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
Re: [Sikuli-driver] [Question #240278]: Changing the Windows Theme using Java / Sikuli
Question #240278 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/240278 Status: Open = Answered pyCoder proposed the following answer: To make scripts attributable screen size, resolution, and themes have to be taken into consideration. simple make users use windows default theme. write that part in your README.txt. if you target windows 7 part of your initializing script could be something like: windows key type theme open them dialog then arrow down #only works if they have windows default as the first Aero theme. enter key keep in mind it's all key strokes that way the visual part of sikuli would not fail during setup. be creative. or Put in your setup instructions please use this screen size, resolution, and default theme. -- 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 #240375]: MinSimilarity setting is implemented incorrectly?
New question #240375 on Sikuli: https://answers.launchpad.net/sikuli/+question/240375 Hi, I have a list of images that look very similar. In fact, when a run a loop over them, I see that the S parameter (similarity) is 1.00 for some of them and 0.99 for the others. It looks like that: The code: for x in findAll(FlagYellow.png): x.highlight(1) The screen output: [log] highlight M[15,294 16x15]@S(0)[0,0 1280x1024] S:1.00 Center:23,301 for 1.0 secs [log] highlight M[15,321 16x15]@S(0)[0,0 1280x1024] S:1.00 Center:23,328 for 1.0 secs [log] highlight M[15,375 16x15]@S(0)[0,0 1280x1024] S:1.00 Center:23,382 for 1.0 secs [log] highlight M[15,542 16x15]@S(0)[0,0 1280x1024] S:0.99 Center:23,549 for 1.0 secs [log] highlight M[15,402 16x15]@S(0)[0,0 1280x1024] S:0.99 Center:23,409 for 1.0 secs [log] highlight M[15,402 16x15]@S(0)[0,0 1280x1024] S:0.98 Center:23,409 for 1.0 secs Now, when I set the Settings.MinSimilarity parameter to 1.00, the iteration goes just through some of the objects(not all of them) that used to have 1.00 similarity (at least according to the log on the screen). However, when I set the parameter to be 0.99, it iterates through ALL the objects with similarity 1.00 but does not iterate over the objects with similarity 0.99. This is actually exactly what I am looking for but it doesn't seem right. Is that just me or maybe that's a bug? Regards, Eugene -- 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