• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cliclick Fails on NON-Laptop Mavericks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cliclick Fails on NON-Laptop Mavericks


  • Subject: Re: Cliclick Fails on NON-Laptop Mavericks
  • From: "koenig.yvan" <email@hidden>
  • Date: Thu, 12 Dec 2013 09:53:11 +0100


Le 12/12/2013 à 02:04, Robert Poland <email@hidden> a écrit :

Hi,

The script (below) no longer works on desktop computers running Mavericks. It does work on laptops.

Running the script moves the cursor to the green button but does not click it.

Running the command in Terminal does move to and click the button.

So far the developer has no ideas.

Any thoughts?


-- NOTE: THIS SCRIPT MAY DEPEND ON THE SATIMAGE.OSAX
-- NOTE: THIS SCRIPT MAY DEPEND ON CLICLICK
— http://www.bluem.net/en/mac/cliclick/

on run
main()
beep
end run

on main()
set applicationName to (info for (path to frontmost application))'s short name

tell application applicationName
activate
try
set {leftEdge, topSide, null, null} to bounds of window 1
on error
beep 2
tell application "System Events"
display dialog "This function is broken when used with " & applicationName
end tell
end try

if applicationName contains "Finder" then
set y to (topSide - 12) as integer -- locate green button
else
set y to (topSide + 12) as integer
end if
set x to (leftEdge + 52) as integer
delay 0.5 -- needs this value or greater
do shell script "cliclick c:" & x & "," & y -- click it
end tell
end main

TIA,

Robert Poland


Hello Robert

Are you sure that your script behaves well on laptops .

You codd :
do shell script "cliclick c:" & x & "," & y -- click it
when you need to use :

do shell script "  cliclick c " & x & "  "  & y  — in fact you control click it

I really don’t guess what was the colon doing in your instruction 
The comma separating the two parameters is wrong.

cliclick -h which if the table of law say:

 cliclick - Command Line Interface Click
 Version 1.3.1
 Carsten Bluem, 2010-04-13
 http://www.bluem.net/en/mac/cliclick/

 Usage: cliclick [-v] [-r] [-q] [-w n] x y [x2 y2] [x3 y3] [...]
   x and y are integer numbers which specify the screen coordinate(s)
   where the mouse click(s) should be emulated. (Upper left corner is 0 0)
   Instead of a number, you may pass "m" as x and / or value to
   use the current x and / or y position.

   If you need a doubleclick, prefix the x coordinate with "d".
   If you need a control click, use prefix "c".

 Options:
   -w <n> You can pass multiple coordinate pairs as argument. But if you do,
          it is often useful to have a small delay between events -- that is
          what the -w option is for: It will cause cliclick to wait for the
          specified number of milliseconds after each event.
   -q     Instead of clicking, print the current mouse pointer.
          location on the screen (format "x,y") and exit.
   -r     Restore initial mouse location after performing the clicks.
   -v     Makes cliclick more verbose.

 Examples:
   'cliclick 26 12' will click the apple menu
   'cliclick 50 60 c70 80' will click at 50/60, then Control-click at 70/80
   'cliclick d50 60' will doubleclick at 50/60
   'cliclick dm m' will doubleclick the current mouse location
   'cliclick c500 m' will control-click at x position 500 and
                     the mouse's current y position.
   'cliclick -w 50 26 11 26 33' will open the "About this Mac" panel
   'cliclick -r 26 12' will click the apple menu and, afterwards,
                       restore the initial mouse location.
   'cliclick -q' will print the current mouse location.


Yvan KOENIG (VALLAURIS, France) jeudi 12 décembre 2013 09:51:13



 _______________________________________________
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

  • Follow-Ups:
    • Re: Cliclick Fails on NON-Laptop Mavericks
      • From: Robert Poland <email@hidden>
References: 
 >Cliclick Fails on NON-Laptop Mavericks (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: applescript, Wirecast, and file references
  • Next by Date: Re: As Alias List?
  • Previous by thread: Cliclick Fails on NON-Laptop Mavericks
  • Next by thread: Re: Cliclick Fails on NON-Laptop Mavericks
  • Index(es):
    • Date
    • Thread