Re: Rep: Cliclick Fails on NON-Laptop Mavericks
Re: Rep: Cliclick Fails on NON-Laptop Mavericks
- Subject: Re: Rep: Cliclick Fails on NON-Laptop Mavericks
- From: Robert Poland <email@hidden>
- Date: Thu, 12 Dec 2013 09:14:10 -0700
On Dec 12, 2013, at 8:13 AM, koenig.yvan <email@hidden> wrote:
<Snip>
> Why are you using a third party command when what you want to achieve may be done with in the box code ?
What is “box code”?
> -- NOTE: THIS SCRIPT MAY DEPEND ON THE SATIMAGE.OSAX
>
> on run
> main()
> beep
> end run
>
> on main()
> --set applicationName to (info for (path to frontmost application))'s short name
> set applicationName to "Finder"
> tell application applicationName
> activate
> if applicationName contains "Finder" then
> tell application "System Events" to tell process "Finder"
> tell (first window whose subrole is "AXStandardWindow")
> # properties of button 2
> click button 2
> end tell
> end tell
> end if
> end tell
> end main
Works with Finder.
but this doesn’t work on other apps.
on run
main()
beep
end run
on main()
set applicationName to (info for (path to frontmost application))'s short name
-- set applicationName to "Finder"
tell application applicationName
activate
-- if applicationName contains "Finder" then
tell application "System Events" to tell process applicationName
tell (first window whose subrole is "AXStandardWindow")
# properties of button 2
click button 2
end tell
end tell
-- end if
end tell
end main
> Yvan KOENIG (VALLAURIS, France) jeudi 12 décembre 2013 16:12:10
Robert Poland - Fort Collins, CO
_______________________________________________
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