ActiveTcl discussion

Tcl and ActiveTcl usage questions; Tcl practices and programming questions

Opening a serialport and transmitting on the dtr, rts and txd pins

Hello all,

I am new to tcl and I am trying to find some code that will open a serialport and be able to transmit on the dtr, rts and txd pins of my rs232 to usb cable.

Has anyone done this before and have some code examples or can someone point me to a good source for it please.

Thanks in advance

Error in startup script

Hello guys,

I am trying to run a tcl code but having an error message as "Error in startup script", invalid command name "wipe" while executing "wipe". Did some of you encounter a similar problem and solve it?

Thanks in advance

[Tcl/Tk 8.6]Tk window(toplevel) became unresponsive while launching tk_messageBox on Linux platform

Tcl/Tk Version Information:
Platform: Linux
Tcl Version: 8.6.7
Tk Version : 8.6.7

Issue: [Tcl/Tk 8.6]Tk window(toplevel) became unresponsive while launching tk_messageBox in Linux platform

Step to Reproduce issue:
1. create a sample tk window using toplevel command with a button.
toplevel .window
button .window.button1 -text "Ok" -command "puts hello"
pack .window.button1
(At this point everything works fine, .window and .window.button1 works fine)

2. open tk_messageBox. Now after launching tk_messageBox, .window and .window.button1 is became

Formating long strings with new line

Hello Forum,
Newbie here with a request for help with formatting. I need to trim and add newline at each "\" in a file location string that lies beyond the 60 character max for each line. Sample in attached file will be best explanation. Please notice the final file name is on its own line, 60 characters is max length per line and the indent is 3 blank spaces after the '('

Thank you for any assistance

i have a isuue

hi everyone
The difference is in which math library they call.

Java, Google, and C# are using the MicroSoft C# floating point math library.

Tcl and Perl are using a C floating point math library.

Both libraries follow their respective standards, so both are correct. You may disagree with the way the standards have been defined, but that is one of the differences of C vs C#.

Get The Command To Be Deleted

I am writing a C++ extension for ActiveTCL. As I understand it the Tcl_CmdDeleteProc that is supplied when a command is created will be called when the command is to be deleted.

When called, the Tcl_CmdDeleteProc is supplied with the Client data for the command. But I would also like to know the name of the command that is about to be deleted but that is not provided to the Tcl_CmdDeleteProc. Is it posssible to get the name of the command that is about to be deleted?


TCL Shell works but Komodo Shell does not

The following script called test1.tcl works well from a tclsh command line.

# test1.tcl
set matchResults [exec /usr/bin/neo4j-client --non-interactive --eval "match (n) return n;" localhost]
puts "Success! \n\n $matchResults \n"

% source test1.tcl


tcllib missing from Tcl 8.6 Community Edition

Tried to import the crc32 package and the response is "can't find package crc32".

Is tcllib not included in the Community Edition? If not, why document it in the Help file?

What else is not included in the Community Edition?

Error in choosing directory for installing ActiveTcl 8.5 for OpenSees


I'm trying to install ActiveTcl for OpenSees software. The instructions are to save it in C:/Program Files/Tcl.

But I attempt to do this, it says, "Cannot Write to Directory "C:/Program Files/Tcl". Please choose another directory.

Any help would be greatly appreciated


Multi process handling in TCl script

Need solution for parallel processing in tcl (windows).

I tried with thread, still not able to achieve desired output.

To simplify My requirement I am giving a simple example as following. Requirement: I want to run notepad.exe without effecting my current execution of flow. From main thread control should go to called thread, start notepad.exe and come back to main thread with out closing the notepad .

Tried:(Tcl script)

package require Thread

set a 10

proc test_thread {b} {

puts "in procedure $b"
set tid [thread::create] ;# Create a thread
return $tid