Apparently the system tray now uses StatusNotifier instead of xembed to display tray icons.
Is there any way to implement the new standard in tcltk?
Andrew
OK, I ran some more tests as suggested and it appears that the [eof $chan] returns true even though the file is still open and being appended to.
So I need to work out how to wait until the next line is written and then to read that line, until the real eof occurs
Andrew
I have an simple script which opens a file, reads it and puts each line, until it reaches an eof and then closes.
This is then called by other scripts which are performing actions and logging the results. So the first script reads the log, as it is written, and displays the progress.
Up until...
feherka's code seems to work for me. If we amend it slightly and run it on the file that you have shown in you last post, warts and all, then this code:
puts -nonewline "please enter the library name : "
flush stdout
gets stdin name
set fil [open "netlist.txt" r]
set inside 0
set subckt ""...
Looks to me as if you can add a count for the line numbers, treat the line as a list so pick each item needed with lindex, then reassemble the line in the right order and output the result.
Andrew
I have created a page displayed as a png file. To show a thumbnail of the image I have used the following code:
image create photo tmppage -file "$file"
page copy tmppage -subsample $zoom $zoom -shrink
Unfortunately the -subsample option reduces the clarity of the image to a huge degree, is...
If anyone is interested I worked it out:
set pid [exec some_task &]
while {[catch {exec ps --no-headers -p $pid}] == 0} {do_something; update}
May not be the best way but it seems to work anyway
Andrew
Put simply I would like to follow the progress of a background task.
The task would be run as: exec some_task &
While it is running I would like to check its progress: while {true} {test_progress}
So I was thinking: set pid [exec some_task &]...
Counter intuitively it seems that if I add:
catch {exec numlockx off}
then it solves the problem, but then I have to turn it back on when I leave the programme. Weird.
Here is my solution:
wm protocol . WM_DELETE_WINDOW {catch {exec numlockx on}
exit}
# set numlock off so that we can use...
Having some problems with the state of the numlock key with my tcltk programmes. Problem is I am running Linux (numlock enabled) and windows in Virtualbox (numlock enabled) but when I open my tcltk programme I find that the numlock is disabled.
How can I tell the state of the numlock key and...
I know this must be simple, but, I have a text widget and would like to trap a tab entry within the text such that:
Pressing tab executes a tcl script but does not enter a tab character in the text.
A simple "bind" enters the tab character and then runs the script.
Thanks
Andrew
Success, removed the quotes from out.pdf and it ran.
Not a problem for me, but I wonder how to pass a filename with spaces as the output file.
Thanks for the help.
OK it is working now, I had to double quote the path \s and put $command in inverted commas
set f [open "$command" "r"]
Now the error is the same as when I ran the command with exec if I remember correctly. It is from Ghostscript:
could not open the file "out.pdf"
Tried that with no luck. Here is the output
pwd = C:\tmp
command = "C:\Program Files\gs\gs9.04\bin\gswin32c.exe" -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/ebook -sOutputFile="out.pdf" -dNOPAUSE -dQUIET -dBATCH "20120327195139.pdf"
The error is
couldn't open ""C:\Program...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.