← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #269784]: copy text from text box

 

Question #269784 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/269784

Description changed to:
Hello,

I want to copy text from a text box, when I use  type("a",
KeyModifier.CTRL) I get an error : the function type can only get a
string, and when i use keyboard the problem is the same .

My code :

Target textvalue=new ImageTarget(new File("text-value.PNG"));
ScreenRegion s = new DesktopScreenRegion();
ScreenRegion sr= s.find(textvalue);
Mouse mouse=new DesktopMouse();
mouse.click(sr.getCenter());
 type("a", KeyModifier.CTRL);
type("c", KeyModifier.CTRL);
text=Env.getClipboard();

Thank you for your help

YO

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.