• 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: Detect when I start to work...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect when I start to work...


  • Subject: Re: Detect when I start to work...
  • From: 2551phil <email@hidden>
  • Date: Sat, 25 Mar 2017 12:42:56 +0700

Have you tried Keyboard Maestro?


Of course. I’d imagine most people on this list are familiar with it; KM’s been around a long time.

I’d do what Jean-Christophe wants to do in ASObjC, if I were him, but if he wants a faster and quicker way to get up and running and is considering 3rd party tools, then Hammerspoon has some advantages.

1. All the source code it uses is plain old C or Objective-C - which means its very fast - and its all open source available for inspection when you download it. The ASObjC code I posted earlier was basically a stripped down version of the code in the hs.caffeinate.watcher method, which I then translated into ASObjC (following a template for adding NSNotification observers that Shane had written).

2. Lua (which Hammerspoon uses on the front end) is also about the simplest scripting language to learn I’ve ever come across (at least to learn enough to get work done). The Hammerspoon page has a tutorial with loads of examples, and you don’t need to get more than about 10 minutes experience to figure out how to write your own. Some of the syntax is very applescripty, and indeed Lua's been around about as long (since 1993). 

3. It’s free and has no external dependencies. 


Best


Phil
@sqwarq







On 25 Mar 2017, at 12:03, Jim Underwood <email@hidden> wrote:

Phil,

Have you tried Keyboard Maestro?
A full functional trial version is free for 30 days.

It would appear that KM and Hammerspoon (HS) are apples and oranges.

HS looks like a relatively low-level language with a pure text development environment.
KM is a high-level automation tool where you visually add Actions, which range from simple to comprehensive.  But you can can also make use of many different kinds of scripts, if you need to.
KM provides built-in features/Actions for much of what you would have to write scripts for in HS.

While there is a learning curve with KM, as there is with any automation tool, it is no where near that of learning a programming language.  In addition, there are many pre-built KM Macros available (each can be customized), and the KM forum offers the best help of any I've seen.

I think it comes down to how much you value your time.  With KM, you can complete powerful, useful macros the same day you install it.

Although KM is not free, it is inexpensive at $28 with the 20% discount available here.

Finally, KM is under active development, and has been for many years.  The developer is brilliant, very dedicated, and interacts daily with his users in the KM forum.  He is very responsive to bug reports and enhancement requests.  


Best Regards,

 

Jim Underwood
aka JMichaelTX


From: <applescript-users-bounces+jmichael=email@hidden> on behalf of 2551phil <email@hidden>
Date: Fri, Mar 24, 2017 at 11:23 PM
To: Jean-Christophe Helary <email@hidden>
Cc: "ASUL (AppleScript)" <email@hidden>
Subject: Re: Detect when I start to work...

Well, if you’re going to go 3rd party you can also achieve what you want very easily with Hammerspoon, which has the added advantage of being free. 
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: 
 >Re: Detect when I start to work... (From: Jim Underwood <email@hidden>)
 >Re: Detect when I start to work... (From: Jean-Christophe Helary <email@hidden>)
 >Re: Detect when I start to work... (From: 2551phil <email@hidden>)
 >Re: Detect when I start to work... (From: Jim Underwood <email@hidden>)

  • Prev by Date: Re: Detect when I start to work...
  • Next by Date: Re: Detect when I start to work...
  • Previous by thread: Re: Detect when I start to work...
  • Next by thread: Re: Detect when I start to work...
  • Index(es):
    • Date
    • Thread