• 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: Using cliclick with apple script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using cliclick with apple script


  • Subject: Re: Using cliclick with apple script
  • From: "-dan d." <email@hidden>
  • Date: Sun, 24 Jul 2016 20:48:25 -0400 (EDT)


Christopher,

Thanks, I'll give it a try.

On Sun, 24 Jul 2016, Christopher Stone wrote:

On Jul 24, 2016, at 17:15, -dan d. <email@hidden> wrote:
There is a small cli utility that can controll all aspects of the apple desktop from the command line, cliclick.  It is free and the developer is very open to requests for changes:


Hey XB,

Yes, it's pretty spiffy.

I can put a cliclick macro series of keystrokes in a shell script but AppleScript seems not to evoke it, it simply seems to ignore it.

AppleScript's shell environment is not the same as your log-in shell.

Run this in the Script Editor:

-----------------------------------------------------------------
set shCMD to "
echo $PATH
"
do shell script shCMD
-----------------------------------------------------------------

Compare to echo $PATH in the Terminal.

This sort of thing should work, although you might have to adjust the path(s) a bit.

-----------------------------------------------------------------
set shCMD to "
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH;
cliclick m:500,500
"
do shell script shCMD
-----------------------------------------------------------------

If you're wanting to automate non-scriptable apps then you should discover more about System Events and GUI-Scripting and perhaps Keyboard Maestro <http://www.keyboardmaestro.com/>.

--
Best Regards,
Chris



XB
 _______________________________________________
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

References: 
 >Using cliclick with apple script (From: "-dan d." <email@hidden>)
 >Re: Using cliclick with apple script (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Using cliclick with apple script
  • Next by Date: Re: Using cliclick with apple script
  • Previous by thread: Re: Using cliclick with apple script
  • Next by thread: Re: Using cliclick with apple script
  • Index(es):
    • Date
    • Thread