Cliclick Fails on NON-Laptop Mavericks
Cliclick Fails on NON-Laptop Mavericks
- Subject: Cliclick Fails on NON-Laptop Mavericks
- From: Robert Poland <email@hidden>
- Date: Wed, 11 Dec 2013 18:04:48 -0700
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
iMac, Late 2013, 14,2
3.2 GHz Intel Core i5 27"
16 GB Ram
1TB Fusion HD
OS X 10.9
iMac, Mid 2011, 12,2
2.7 GHz Intel Core I5, 27”
12 GB Ram, 1TB HD
OS X 10.9
MacBook Pro 15" Early 2008, 4,1
2.4 GHz Intel Core 2 Duo
4 GB Ram
OWC 3G SSD 240GB
OS X 10.9
i
_______________________________________________
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