Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. fdservices

    System Tray and StatusNotifier

    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
  2. fdservices

    Upgrade to 8.6 causes file problems.

    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
  3. fdservices

    Upgrade to 8.6 causes file problems.

    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...
  4. fdservices

    tcl array problems

    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 ""...
  5. fdservices

    Edit file contents

    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
  6. fdservices

    Quickly manipulate photo images

    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...
  7. fdservices

    Get progress of exec command

    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
  8. fdservices

    Get progress of exec command

    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 &]...
  9. fdservices

    Numlock

    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...
  10. fdservices

    Numlock

    Problem is I am running Linux
  11. fdservices

    mysqltcl installation

    Check for a --with-tclconfig flag in the configure options
  12. fdservices

    Numlock

    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...
  13. fdservices

    Trapping tab in text box

    Answered myself. Use bind but issue a break command in the script to stop the processing of the character in the text widget Andrew
  14. fdservices

    Trapping tab in text box

    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
  15. fdservices

    Exec command in Windows

    It always seems to be so easy when you say it. Seriously, I am very grateful for you help, my programme is working perfectly now. Andrew
  16. fdservices

    Exec command in Windows

    Hah! I read the manual The errors are returned with the close command, so can be caught there. Andrew
  17. fdservices

    Exec command in Windows

    One final question How do I trap errors in the command being executed with set f [open "$command" "r"] Thanks Andrew
  18. fdservices

    Exec command in Windows

    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.
  19. fdservices

    Exec command in Windows

    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"
  20. fdservices

    Exec command in Windows

    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...

Part and Inventory Search

Back
Top