mail icon / auto window selecting

Todd Day todd at ivucsb.sba.ca.us
Sun Oct 22 10:03:22 AEST 1989


I am running elm on my UNIXPC.  I'm also still using UA (which suits
me just fine).

Here's my problem:

When mail comes in for me, the mail icon lights up.  I want to be able
to click on the mail icon and autoboot elm for me.  I know of one way
to do this making a C program called "/usr/bin/email" that runs elm.
However, often I leave elm running in a window.  If I click on the icon
and elm is already running, the second version of elm complains that
I am already running elm (it checks a lock file in tmp).  What I want
is a program that checks to see if that lock file exists, and if it
does, finds the window that elm is running in and brings it to the
foreground.

Is this possible?

Oh, BTW, I call "elm" from a menu selection.  Here is /usr/lib/ua/Email:

Name=Mail Status
Default=Run
Run=SH -w /usr/local/etc/mail_stat
Name=Elm
Default=Run
Run=SH -wd /usr/local/etc/elm.fix
Name=Read News
Default=Run
Run=SH -wd /usr/local/etc/nn.fix

and here is /usr/local/etc/elm.fix:

stty kill 
/usr/local/bin/windy -n "Elm"
/usr/local/bin/elm

As you can see, I open up elm into it's own window.  I do this so I can
easily select it with the Window Manager icon.

Now, the way I see it, I should be able to look thru all the open windows
for the window named "Elm".  Once I find out which one it is, how do I
promote it to the top?

-- 
Todd Day  |  todd at ivucsb.sba.ca.us  |  ivucsb!todd at anise.acc.com
"But a machine that was powerful enough to accelerate particles to the grand
 unification energy would have to be as big as the Solar System -- and would
 be unlikely to be funded in the present economic climate." -- Stephen Hawking



More information about the Unix-pc.general mailing list