← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #202853]: Drag or mouseDown won't grab a selection

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
I tested on my Mac OSX 10.7.4
dragging a group of files from a Finder column to another column.

the following script worked as expected:

img = "QnativeFinde.png"
m = find(img).getCenter()
#hover(m)
click(m.below(4*18)) # click below to activate window
#select 4 files
click(m)
click(m.below(3*18), KeyModifier.SHIFT)
wait(2)
# drag
mouseDown(Button.LEFT)
wait(0.5)
mouseMove(m.left(50).below(50))
wait(0.5)
#drop
mouseUp(Button.LEFT)

But there is a strange behavior after having run this script:
The Finder window I acted on always stays in front, no matter where I click. Even after using the task switcher to come back to Sikuli-IDE, the next click brings back the Finder window. Closing the Finder window stops the behavior.

I do not know, what this means for your situation, but at least with Mac
Lion there seems to be a problem with the usage of the Java Robot class
mouse feature.

I have no idea for a workaround.

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