From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Suckling Subject: Re: Re: ANN: org-mac-protocol : AppleScripts to invoke org-protocol from various applications Date: Sun, 02 Aug 2009 10:48:22 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXWk5-0007A2-6P for emacs-orgmode@gnu.org; Sun, 02 Aug 2009 04:48:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXWk0-00079q-CI for emacs-orgmode@gnu.org; Sun, 02 Aug 2009 04:48:32 -0400 Received: from [199.232.76.173] (port=55881 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXWk0-00079n-8r for emacs-orgmode@gnu.org; Sun, 02 Aug 2009 04:48:28 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:49202) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXWjz-0001DA-KC for emacs-orgmode@gnu.org; Sun, 02 Aug 2009 04:48:27 -0400 Received: by ewy7 with SMTP id 7so579118ewy.42 for ; Sun, 02 Aug 2009 01:48:26 -0700 (PDT) In-Reply-To: (Austin Frank's message of "Mon, 20 Jul 2009 17:10:38 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Austin Frank Cc: emacs-orgmode@gnu.org On Mon, 20 Jul 2009 17:10:38 -0400, Austin Frank wrote: > > Thanks! This looks really interesting. Is there any way to use > applescript to track change in application focus? I'd be interested in > logging when I change to or away from each application, and having that > time tracking information available from within org. Does this seem > possible? > org-(mac)-protocol is certainly the mechanism to get the information into org-mode, but I'm not sure that AppleScript is the best way of tracking application focus. To be honest, my AppleScript is even more cludgy than my elisp, but from what I understand, the best that can be done is to write a script that makes a call every, say, 10 seconds to check which window is in focus. I'll put it on my todo list, but please don't hold your breath - I've just entered a hellishly busy four months. Christopher