Re: [Sikuli-driver] [Question #243323]: How To import a .skl file --- workaround
Question #243323 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/243323 Rubynator posted a new comment: RE- Edited. Please disregard the previous one and review this one. Thank you for that. now I have this: import org.sikuli.basics.FileManager as SFm import os scriptPath = os.path.join(os.path.dirname(os.path.dirname(getBundlePath( sub = os.path.join(scriptPath, assignment1.skl) subPath = SFm.unzipSKL(sub) # put it on sys.path sys.path.append(os.path.dirname(subPath)) # import it from sikuli import assignment1 And I get this error message: [error] script [ Xcode2 ] stopped with error in line 10 [error] ImportError ( cannot import name assignment1 ) What am I doing wrong? -- 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 #243323]: How To import a .skl file --- workaround
Question #243323 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/243323 Rubynator posted a new comment: Thank you for that. now I have this: import org.sikuli.basics.FileManager as SFm import os scriptPath = os.path.join(os.path.dirname(os.path.dirname(getBundlePath( sub = os.path.join(scriptPath, assignment1.skl) subPath = SFm.unzipSKL(sub) # put it on sys.path sys.path.append(os.path.dirname(subPath)) # import it from sikuli import assignment1 And I get this error message: [error] script [ Xcode2 ] stopped with error in line 10 [error] ImportError ( cannot import name Xcode2 ) What am I doing wrong? -- 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 #244492]: What is exit code 129?
Question #244492 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244492 Status: Answered = Open YuhsuanChen is still having a problem: Hi, I can run the script alone. But this issue happen rate is once and I can't reproduce this symptom. I check all log, I can find retune exit code 129 only and there is no other exception. -- 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 #244539]: openapp can't run shell script with argument
New question #244539 on Sikuli: https://answers.launchpad.net/sikuli/+question/244539 Hi, I write a script need to open another jar file, so I use shell script to run this jar with some argument. The shell script will help me to login account. ex: openApp(/home/user/run.sh username password filepath) But I find Sikuli will not run the script, is sikuli not support this way to run shell script? -- 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 #244539]: openapp can't run shell script with argument
Question #244539 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244539 Status: Open = Answered RaiMan proposed the following answer: no, it does not (yet ;-) use Jython subprocess instead -- 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 #243323]: How To import a .skl file --- workaround
Question #243323 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/243323 RaiMan posted a new comment: yeah, not that easy to look through ;-) but now you are nearly there. a little know how boost: from sikuli import assignment1 what you are saying to Sikuli: look for a module sikuli and inside this module look for something named assignment1 This cannot work, since the module sikuli comes with the package (therefor the from sikuli import *, so all names contained in sikuli module and submodules are known in your script - for the main script this is done automatically at runtime), because it does not have anything named assignment1 (and if it had, it would not be what you want ;-) modules are found by their name in the folders listed in sys.path. with sys.path.append(os.path.dirname(subPath)) we have put the parent folder of the unzipped assignment1.sikuli on sys.path. now assignment1.sikuli is locatable. so simply import assignment1 will import your stuff according to the rules that apply to importing a .sikuli script this way: - the contained .py script is imported according to the Python-rules - the path to the .sikuli folder is put on ImagePath (so images referenced in the imported module are found.) now you can use names defined in assignment1 like this: assignment1.some_name (variable) assignment1.some_name() (function or class) If you have taken care, that you will not get any name clashes (naming convention) you might use as well from assignment1 import * some_name (variable) some_name() (function or class) hope this helps -- 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 #244492]: What is exit code 129?
Question #244492 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244492 Status: Open = Answered obiwan-92 proposed the following answer: Ok. Can you try to add the -d3 parameters when you call the sikuli jar. Normally you can redirect the load to a txt file. -- 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 #244492]: What is exit code 129?
Question #244492 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244492 obiwan-92 proposed the following answer: Correcting myself: Normally you can redirect the log to a txt file. -- 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 #244539]: openapp can't run shell script with argument
Question #244539 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244539 obiwan-92 proposed the following answer: Hello. Try the command : import os os.popen(/home/user/run.sh username password filepath) Tell if it's work. Regards. -- 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 #244539]: openapp can't run shell script with argument
Question #244539 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244539 Status: Answered = Solved YuhsuanChen confirmed that the question is solved: Thanks obiwan-92, 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] [Question #244556]: sikuli-java correct way to get data from clipboard
New question #244556 on Sikuli: https://answers.launchpad.net/sikuli/+question/244556 I am using sikuli-java.jar from Eclipse to build and run my tests. I am getting very in-consistent results while using CTRL-C and retrieving the data from the clipboard using Env.getClipboard(). Some times the data gets copied while some times not. I tried to slow down the execution of steps to avoid running into delays in the copied data being available in clipboard, but that didn't help. Also noticed that Env.getClipboard() comes up as deprecated. Is there an alternate mechanism / API that we are supposed to use to get the data from clipboard ? 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 #244556]: sikuli-java correct way to get data from clipboard
Question #244556 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244556 Status: Open = Answered obiwan-92 proposed the following answer: Hello, All the information here : https://answers.launchpad.net/sikuli/+question/239208 Regards. -- 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 #244556]: sikuli-java correct way to get data from clipboard
Question #244556 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244556 RaiMan proposed the following answer: I think, this is a bug, but I did not yet dive into. feel free to report a bug (not necessary though) I set the whole ENV class as deprecated, since the function implementations have been moved to other locations, but are internally redirected for backward compatibility. the clipboard implementation is still the same as with RC3 and I had the impression, that it makes problems when used together with paste() in the same JVM session. Since you are programming in Java, there is no need to rely on the Sikuli feature: the Sikuli implementation (being now in class App) using java.awt.datatransfer together with the Toolkit.getDefaultToolkit().getSystemClipboard() So you might as well implement your own solution for a getClipboard. If you do, any findings would be helpful of course. this is the relevant coding: /** * evaluates the current textual content of the system clipboard * @return the textual content */ public static String getClipboard() { Transferable content = Clipboard.getSystemClipboard().getContents(null); try { if (content.isDataFlavorSupported(DataFlavor.stringFlavor)) { return (String) content.getTransferData(DataFlavor.stringFlavor); } } catch (UnsupportedFlavorException e) { Debug.error(Env.getClipboard: UnsupportedFlavorException: + content); } catch (IOException e) { e.printStackTrace(); } return ; } /** * sets the current textual content of the system clipboard to the given text * @param text */ public static void setClipboard(String text) { Clipboard.putText(Clipboard.PLAIN, Clipboard.UTF8, Clipboard.BYTE_BUFFER, text); } private static class Clipboard { public static final TextType HTML = new TextType(text/html); public static final TextType PLAIN = new TextType(text/plain); public static final Charset UTF8 = new Charset(UTF-8); public static final Charset UTF16 = new Charset(UTF-16); public static final Charset UNICODE = new Charset(unicode); public static final Charset US_ASCII = new Charset(US-ASCII); public static final TransferType READER = new TransferType(Reader.class); public static final TransferType INPUT_STREAM = new TransferType(InputStream.class); public static final TransferType CHAR_BUFFER = new TransferType(CharBuffer.class); public static final TransferType BYTE_BUFFER = new TransferType(ByteBuffer.class); private Clipboard() { } /** * Dumps a given text (either String or StringBuffer) into the Clipboard, with a default MIME type */ public static void putText(CharSequence data) { StringSelection copy = new StringSelection(data.toString()); getSystemClipboard().setContents(copy, copy); } /** * Dumps a given text (either String or StringBuffer) into the Clipboard with a specified MIME type */ public static void putText(TextType type, Charset charset, TransferType transferType, CharSequence data) { String mimeType = type + ; charset= + charset + ; class= + transferType; TextTransferable transferable = new TextTransferable(mimeType, data.toString()); getSystemClipboard().setContents(transferable, transferable); } public static java.awt.datatransfer.Clipboard getSystemClipboard() { return Toolkit.getDefaultToolkit().getSystemClipboard(); } private static class TextTransferable implements Transferable, ClipboardOwner { private String data; private DataFlavor flavor; public TextTransferable(String mimeType, String data) { flavor = new DataFlavor(mimeType, Text); this.data = data; } @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[]{flavor, DataFlavor.stringFlavor}; } @Override public boolean isDataFlavorSupported(DataFlavor flavor) { boolean b = this.flavor.getPrimaryType().equals(flavor.getPrimaryType()); return b || flavor.equals(DataFlavor.stringFlavor); } @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (flavor.isRepresentationClassInputStream()) { return new StringReader(data); } else if (flavor.isRepresentationClassReader()) { return new StringReader(data); } else if (flavor.isRepresentationClassCharBuffer()) { return CharBuffer.wrap(data); } else if (flavor.isRepresentationClassByteBuffer()) { return ByteBuffer.wrap(data.getBytes()); } else if (flavor.equals(DataFlavor.stringFlavor)){ return data; } throw new UnsupportedFlavorException(flavor); } @Override
[Sikuli-driver] [Question #244560]: How to click using text instead of images
New question #244560 on Sikuli: https://answers.launchpad.net/sikuli/+question/244560 Hi I like to click using Text instead of caprtuing a screenshot. May i have the sample code to perfom the same -- 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 #244562]: I like to run the sikuli on IPad..PLease let me know the procedure for the same
New question #244562 on Sikuli: https://answers.launchpad.net/sikuli/+question/244562 Hi I like to run the sikuli on Ipad ...Is there a way to run the same -- 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 #244515]: click images in a loop (checkbox inside the image)
Question #244515 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244515 Status: Answered = Open Samir is still having a problem: Hi Eugene, It looks like my IDE is incorrect? Code I tried: setBundlePath(C:\polaris) find(asrS.png).find(1393256406284.png).click() find(asr34.png).find(1393256406284.png).click() Error: find(asrS.png).find(1393256406284.png).click() TypeError: click(): expected 1-2 args; got 0 Should I import any module for this. 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 #171313]: X-1.0: IDE: Extensions server not available --- How to load extension Guide?
Question #171313 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/171313 Ron Mal requested more information: Hello, Just wondering if there is a workaround to add the guide.jar to version 1.0.1 of the Sikuli IDE? I tried using the guide.jar version for RC3 located at http://dl.dropbox.com/u/42895525/SikuliGuide.zip to see if it would work in 1.0.1 but I keep getting the error: [error] ImportError ( cannot import name UnionScreen Thank you! -- 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 #171313]: X-1.0: IDE: Extensions server not available --- How to load extension Guide?
Question #171313 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/171313 RaiMan proposed the following answer: Guide is not yet working with 1.0.1. If you want to use it, you have to use RC3 still. Guide will be available with 1.1.0 again (not sure when though) -- 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 #244515]: click images in a loop (checkbox inside the image)
Question #244515 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244515 Status: Open = Needs information RaiMan requested more information: click() is only available with version 1.0.1+ (which version are you using?) BTW: \ in strings must either be doubled or the string set as raw setBundlePath(C:\\polaris) or setBundlePath(rC:\polaris) -- 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 #244562]: I like to run the sikuli on IPad..PLease let me know the procedure for the same
Question #244562 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244562 Status: Open = Answered RaiMan proposed the following answer: only against the emulator on your workstation. -- 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 #244583]: How to rotate a image (360 degree) using sikuli
New question #244583 on Sikuli: https://answers.launchpad.net/sikuli/+question/244583 Hi I need to rorate a image apperaing in my application around 360 degree . Can u provide me a sample code for the same . 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 #244583]: How to rotate a image (360 degree) using sikuli
Question #244583 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244583 Status: Open = Needs information Eugene S requested more information: Greetings, May I enquire as to why would you like to do that? Knowing the reason might lead to a more precise answer. Cheers, 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
Re: [Sikuli-driver] [Question #244583]: How to rotate a image (360 degree) using sikuli
Question #244583 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244583 RaiMan requested more information: just take a copy of the image: this is the image rotated 360 degrees ;-) So I think, you keen something else. -- 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 #244587]: How to scroll to a particular point...
New question #244587 on Sikuli: https://answers.launchpad.net/sikuli/+question/244587 I m using eclipse... I need to scroll to a particular point... I m using s.wheel(Button.WHEEL_DOWN,2); it goes beyond that point.. and if i use s.wheel(Button.WHEEL_DOWN,1); it stops before the point i wanted.. so is there any way to handle this since i cant use float value there... -- 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 #244587]: How to scroll to a particular point...
Question #244587 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/244587 Status: Open = Answered obiwan-92 proposed the following answer: Hello, Yes. You can use the arrow keyboard. For example : type(Key.DOWN*2) Just for information, I don't think the problem come from Sikuli. Try to do the same in the same condition, I believe the scroll will do the same. Normally in the parameters on the mouse in the OS settings you can select the number of line you can scroll. Regards. -- 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