Using:
WINDOWS 2000 Pro
Tcl/Tk 8.4a2
I have the folowing code:
***********************************************************
proc ReadLine {fileId} {
global string1
global progBarRation
if {[eof $fileId]} {
catch {close $fileId}
return
}
set newData [read $fileId 1]
if {[string length newData]} {
if {$newData == "%"} {
set progBarRation string1
update idletask
} else {
set string1 "[string range $string1 1 2]$newData"
}
}
}
set string1 "000"
builtGUI
set fileId [open "| \"C:/Program Files/ATMEL/AVR Tools/Stk500/stk500.exe\" -dATMEGA128 -af0x1D000,0x1FFFF -ofessai.hex -rf" {RDWR TRUNC CREAT}]
fconfigure $fileId -buffering none -blocking 0
fileevent $fileId readable [list ReadLine $fileId]
***********************************************************
this works fine EXCEPT that it behaves as if the called prog (stk500.exe) was sending all its information when ending.
Thus when my script starts the prog stk500.exe is executed in background but nothing appends until it finishes.
Does anybody has an idea?
WINDOWS 2000 Pro
Tcl/Tk 8.4a2
I have the folowing code:
***********************************************************
proc ReadLine {fileId} {
global string1
global progBarRation
if {[eof $fileId]} {
catch {close $fileId}
return
}
set newData [read $fileId 1]
if {[string length newData]} {
if {$newData == "%"} {
set progBarRation string1
update idletask
} else {
set string1 "[string range $string1 1 2]$newData"
}
}
}
set string1 "000"
builtGUI
set fileId [open "| \"C:/Program Files/ATMEL/AVR Tools/Stk500/stk500.exe\" -dATMEGA128 -af0x1D000,0x1FFFF -ofessai.hex -rf" {RDWR TRUNC CREAT}]
fconfigure $fileId -buffering none -blocking 0
fileevent $fileId readable [list ReadLine $fileId]
***********************************************************
this works fine EXCEPT that it behaves as if the called prog (stk500.exe) was sending all its information when ending.
Thus when my script starts the prog stk500.exe is executed in background but nothing appends until it finishes.
Does anybody has an idea?