← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245447]: Looking to copy text from a specific location in a browser

 

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

    Status: Open => Answered

Eugene S proposed the following answer:
Hi,

In that case I can immediately think about 2 options. Maybe there are
more..

Option 1:
Usually lines can be selected by triple clicking near the beginning of that line, i.e. a bit to the left from the first word in line.
The idea is to choose the area correctly, to be in same line as the text you want to copy.

The "triple click" itself can be done this way:

for i in range(3):
   mouseDown(16)
   mouseUp(16)
   type("c", KEY_CTRL)
   wardName = Env.getClipboard()


Option 2:
Use the dragDrop() method. Exalained here:
http://doc.sikuli.org/region.html#Region.dragDrop

here you will have to provide start and end coordinates


Cheers,
Eugene S

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