Notes...that flash by and are gone...(was Re: any good audio/video editing apps in macports?)

Jim Graham spooky130u at gmail.com
Mon Feb 25 05:42:04 PST 2013


On Mon, Feb 25, 2013 at 02:05:07PM +0100, Jan Stary wrote:
> On Feb 24 20:50:52, ctreleaven at cogeco.ca wrote:

> > 3) Deliver the messages in another manner:  eg, cause them to open
> > in TextEdit or a browser window.
> 
> That needs the capability to "open a window".
> No way.

There may be something I'm missing here, but why "No way" ?
I've already written a command-line pair of Tcl/Tk scripts
that should work fine, and last night, e-mailed them to
Craig (off-list) in a response to the post you're responding
to.

It works like this:

First, there's a server app that opens a text widget in Tk, and listens
on a port (by default, port 12345).  When it receives a message, it
displays it in the text window.  I wrote it with two fonts for the
text:  {Courier 18 bold} (and a tag to make it red for stuff that needs
to be stressed) and {Courier 16} for normal text.  An arg to the client
determines which, and that is then sent to the server before the message
itself.

The client app can take the message text from either the second arg (the
first is the text "mode" described above) OR from stdin.

The idea is, you start the server at the very beginning, a text widget
(with a scrollbar and, if the autoscroll extension is included, the
scrollbar will only show up if needed).  Then, when you have a message
(say, "this is a text message") with an important header ("important
header") you could do something like this (after starting the server
at the beginning):

add_text.tcl boldred "important header"
add_text.tcl normal "this is a text message"

It would also be trivial to modify the server to put a blank line between
text messages, but last night, I was trying to finish up between
thunderstorms....

Anyways, it's out there if anyone thinks it's a good idea.  If not, oh
well.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)        MiSTie #49997  < Running Mac OS X Lion >
spooky130u at gmail.com ICBM/Hurricane: 30.44406N 86.59909W

        Do not look into laser with remaining eye.



More information about the macports-users mailing list