Newbie question 
Author Message
 Newbie question

I've read the book (not the Time-Life series book though) and have a small
working (mostly) script which pops up a message when another process runs
a particular program. I use a pipe to communicate between my wish script and
the other sh script. The problem seems to be that when I wait for information
at the pipe -- usually long periods of time (like hours or days) -- the
wish window never gets updated. So if I move another window in front of my
message window, the wish never updates and redraws the message. Any ideas,
suggestions, etc, that will allow the updates to happen asynchronously from
wish script?  All help is appriciated.

The script is attached to the bottom of this message.

Thanks in advance.

Al Niessner III

voice: (814) 865-0968

Script:

#! /every/hades_disc1/Public/GNU/bin/wish -f

set input_line " "
wm withdraw .
wm geometry . +845+537

while {$input_line != "Quit"} {

   update
   set file_ptr [open /every/hades_disc1/Public/Scratch/Modem_Sensor r]
   gets $file_ptr input_line
   close $file_ptr

   if {$input_line == "Start_PPP"} {
        wm deiconify .
        message .msg -width 8c \
          -justify center \
          -relief raised \
          -bd 2 \
          -font -Adobe-Times-Medium-R-Normal--*-240-* \
          -text "PPP connection now in use"
        .msg configure \
          -background black \
          -foreground yellow
        pack .msg
   }
   if {$input_line == "Start_SLIP"} {
        wm deiconify .
        message .msg -width 8c \
          -justify center \
          -relief raised \
          -bd 2 \
          -font -Adobe-Times-Medium-R-Normal--*-240-* \
          -text "SLIP connection now in use"
        .msg configure \
          -background black \
          -foreground yellow
        pack .msg
   }
   if {$input_line == "End"} {
        wm withdraw .
        destroy .msg
   }

Quote:
}

exit


Mon, 10 Nov 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Newbie Question (Was: Newbie Question...)

2. Not a newbie, but a newbie question...

3. Trivial Newbie Question (Newbie)

4. Newbie Question: Realbasic Question

5. Yet another question on system calls(newbie question)

6. A few more newbie questions..

7. Newbie question about worth of specializing in Smalltalk

8. Very Newbie questions

9. Newbie question

10. newbie questionS

11. Another Newbie Question

12. newbie question

 

 
Powered by phpBB® Forum Software