Re: drag and drop with cliclick
Re: drag and drop with cliclick
- Subject: Re: drag and drop with cliclick
- From: David Gregg <email@hidden>
- Date: Mon, 07 Aug 2017 08:06:18 -0600
Strange, working here.
I am using the same version of CLIClick and Sierra.
I generally need to use a time of 1 second or 1000 milliseconds to see results.
Maybe the 500 is too short.
Here is a working example of moving an icon on the Desktop from one location to
another.
tell application "System Events"
tell process "Finder"
set frontmost to true
delay 0.5
keystroke "h" using {command down, option down} -- Hide Others
command
my dragAndDropMouse(1840, 53, 100, 100, 1000)
end tell
end tell
on dragAndDropMouse(startPointX, startPointY, endPointX, endPointY, delayTime)
set scriptContent to "usr/local/bin/cliclick dd:" & startPointX & "," &
startPointY & space & "w:" & delayTime & space & "du:" & endPointX & "," &
endPointY & space & "w:" & delayTime
do shell script scriptContent
end dragAndDropMouse
> On Aug 7, 2017, at 7:50 AM, Yvan KOENIG <email@hidden> wrote:
>
> Thanks, but no luck.
>
> The instruction was executed as :
> do shell script "/Users/admin/bin/cliclick dd:1196,287 w:500 du:1661,678
> w:500"
> and nothing was dropped.
>
> And of course I triple checked that
> tell application "System Events"
> exists disk item "/Users/admin/bin/cliclick"
> end tell
> returns : true
>
> Of course, I checked also the version:
> do shell script "/Users/admin/bin/cliclick -V" --> "cliclick 3.3, 11/12/2016"
>
>
> Yvan KOENIG running Sierra 10.12.6 in French (VALLAURIS, France) lundi 7 août
> 2017 15:42:18
>
>
>> Le 7 août 2017 à 15:14, David Gregg <email@hidden> a écrit :
>>
>> Hi Yvan,
>>
>> Here is what I use for a mouse drag and drop with CLIClick:
>>
>> my dragAndDropMouse(0, 23, 100, 100, 200)
>>
>> on dragAndDropMouse(startPointX, startPointY, endPointX, endPointY,
>> delayTime)
>> set scriptContent to "usr/local/bin/cliclick dd:" & startPointX & "," &
>> startPointY & space & "w:" & delayTime & space & "du:" & endPointX & "," &
>> endPointY & space & "w:" & delayTime
>> do shell script scriptContent
>> end dragAndDropMouse
>>
>> You need to use the "dd" for "drag and drop start" and "du" for "drag and
>> drop end". In some cases it might also require a wait or delay to work
>> properly. It will give you an error with a wait of 0 so modify as you see
>> fit.
>>
>> David Gregg
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden