• 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: [OT] Tk and Apple events [was Re: [OT] My life after AS: shell commands, perl?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Tk and Apple events [was Re: [OT] My life after AS: shell commands, perl?]


  • Subject: Re: [OT] Tk and Apple events [was Re: [OT] My life after AS: shell commands, perl?]
  • From: Kevin Walzer <email@hidden>
  • Date: Fri, 02 Dec 2005 17:33:50 -0500
  • Organization: WordTech Software

has wrote:


Apologies for getting even more OT... but as we've one or two Tcl/Tk folks in the room, just wondering if they'd know how to handle Apple events in a Tk-based app? (Apple events are normally handled off a Carbon/Cocoa event loop, but other GUI frameworks do their own event loops.) I got asked the other day by someone who wants to add a scripting interface to a Python/Tkinter, but it's not something I know anything about. Anyone able to give me a clue on how the two might be meshed?


There are a few different ways.

The most comprehensive approach would be to utilize the TclAE extension (http:://tclae.sourceforge.net). It is developed chiefly in conjunction with the Alpha text editor (which uses Tcl for its scripting interface); I'm not sure how widely it is used outside that. However, it seems to have pretty broad support for Apple events, and is already on Tiger (/System/Library/Tcl/tclae2.0).

A simpler approach, one that I use in my own programs, is to use the Tclapplescript extension (which I noted earlier), which allows you to execute AppleScript from inside a Tcl app. For opening documents or launching applications, piping an "exec" command to /usr/bin/open is convenient.

--
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: [OT] My life after AS: shell commands, perl? (From: Kevin Walzer <email@hidden>)
 >Re: [OT] My life after AS: shell commands, perl? (From: "Mark J. Reed" <email@hidden>)
 >[OT] Tk and Apple events [was Re: [OT] My life after AS: shell commands, perl?] (From: has <email@hidden>)

  • Prev by Date: Re: [OT] My life after AS: shell commands, perl?
  • Next by Date: Re: [OT] Tk and Apple events
  • Previous by thread: [OT] Tk and Apple events [was Re: [OT] My life after AS: shell commands, perl?]
  • Next by thread: Re: [OT] My life after AS: shell commands, perl?
  • Index(es):
    • Date
    • Thread