Все вопросы: [tcl]

85 вопросов

похожие теги: incr-tcltcl-api
1
голосов
1ответов
263 просмотров

spawn process in win XP

I am trying to create a automated ftp log in script in Expect/TCL. This is my script spawn ftp 100.100.100.1 expect ".*:" send "username" expect ".*:" send "password" expect ".*>" I get an error in Windows XP saying , it encountered an error and needs to close . But s...

1
голосов
1ответов
2048 просмотров

How to handle big integers (64 bit) numbers in tcl?

what is the best way to handle big integers in expr command. we know wide in expr.

0
голосов
2ответов
465 просмотров

Finding intersection point between plane and line in tcl?

What is problem with follwoing code? I am getting very strange results. Do I missing something? proc Dot {vec1 vec2} { set ret [expr ([lindex $vec1 0]*[lindex $vec2 0])+([lindex $vec1 1]*[lindex $vec2 1])+([lindex $vec1 2]*[lindex $vec2 2])] } proc FindInterSectPoint_LineAndPlane {normalVectorP...

0
голосов
2ответов
89 просмотров

When was Tcl v8.5 first released for production?

I can't seem to locate this on the web anywhere. What was the date of the first stable release of Tcl v8.5? Thanks.

5
голосов
6ответов
13974 просмотров

whats the difference between a command and a statement

Often when reading about Tcl (e.g. http://antirez.com/articoli/tclmisunderstood.html) you read that "everything is a command". Sometimes you also hear how other languages are, like Tcl, "command languages." To me with my background in other languages, I just view these "commands" as statement...

2
голосов
2ответов
1492 просмотров

How to Convert a Tcl Listbox Numerical Indice to its Element

I feel that this question has a simple answer; but, for the life of me, I could not figure it out. I am trying to convert a listbox selection to its string element so I can enter it into a database. I understand that I can use .listbox curselection to get its index; however, I need to convert...

0
голосов
2ответов
2394 просмотров

Tcl Serial Port fconfigure portability issue

I've got a Tcl/Expect program that reads and writes data to the serial port. I did all of my development and testing on a Fedora 7 machine, but I'm now trying to run the same code in Ubuntu 8.10, and I'm getting the following error: spawn: returns {0} bad option "-mode": should be one of -blocki...

2
голосов
2ответов
4310 просмотров

What is the best way in Tcl v8.4 to have a proc return an array?

If I have a proc that needs to return an array to its caller, what is the best way to do this? I following code does not work in Tcl due to inability to $ an array variable: proc mine {} { array set foo { red 1 blue 2 green 3 } $foo } tcl> set foo [mine] Error: can't read "foo": variabl...

3
голосов
2ответов
1895 просмотров

Any way to embed a comment within a Tcl command?

I would like to have a comment within a command and it appears that this is not possible given that the '#' character is defined in Tcl 8.4 to be: If a hash character (``#'') appears at a point where Tcl is expecting the first character of the first word of a command, then the hash character and...

1
голосов
4ответов
879 просмотров

How to do apply in Tcl 8.4?

In Tcl 8.5 I can do something like this: apply llength { 1 2 3 } But that apply is not defined in v8.4. How would I define apply using Tcl in v8.4? I need this because I am converting some lisp code to Tcl. The lisp code has some constructs that I would like to port like this: array set le...

1
голосов
1ответов
2862 просмотров

How set tcl language parsing rules in function list - notepad++ plugin

I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success. Can you help me please. It will be great if namesapces also parsed.

0
голосов
2ответов
2240 просмотров

How to Handle Tcl Treeview Selections

I am using the following procedure to delete a record within a database that is displayed within a treeview widget (z1): set z1 [ttk::treeview .c1.t1 -columns {first last} -show headings] proc Dlt {} { global z1 z11 sqlite3 db test.db db eval { DELETE From t1 Where First_Nam...

3
голосов
3ответов
1304 просмотров

Tcl Starkit that Reads of off a Sqlite Database

I am trying to build a Tcl Application that reads off of a Sqlite database. When I build a starkit for the application and place the Sqlite database file next to the .tcl file within the .vfs folder and try to run the application (.exe), I receive the error, "can't find package sqlite3 while exe...

2
голосов
2ответов
362 просмотров

How to efficiently get rest of a Tcl list starting from an index?

I would like to get all elements following a particular index of a list. This could be written as: set foo {0 1 2 3 4 5 6 <...> n} puts [lrange $foo 1 [llength $foo]] However, it seems like a waste to compute the length of the list. It would be nice if the last argument to lrange was o...

2
голосов
3ответов
1720 просмотров

How do I query Tcl about its version?

There must be an easy way to do this, but I can't find it. What command can I run within Tcl to get it to introspect and report the version of itself that is running?

2
голосов
7ответов
638 просмотров

Which ingame scripting language should I support?

The ingame script will control NPC/AI logic. If I were to implement ingame scripting feature which language should it support? JavaScript (builtin browser support) TCL (interpreter in java) Lua (popular) Squirrel CSI Other Keep in mind my implementation will run on multiple platforms...

21
голосов
3ответов
41045 просмотров

How to concisely concatenate strings in Tcl?

I can easily concatenate two variables, foo and bar, as follows in Tcl: "${foo}${bar}". However, if I don't want to put an intermediate result into a variable, how can I easily concatenate the results of calling some proc? Long hand this would be written: set foo [myFoo $arg] set bar [myBar $a...

1
голосов
2ответов
1464 просмотров

Populating Tcl Treeview with Sqlite Data

I am building a Tcl application that reads off of a Sqlite Db. Currently, I can enter data into the database using the Tcl frontend. Now, I am trying to figure out how to display the data within the Sqlite Db from the Tcl frontend. After a little bit of research, I found that the treeview widg...

0
голосов
2ответов
681 просмотров

Validate entry with BWidget's ComboBox

The BWidget ComboBox widget allows you to fill in an entry field with a value. I would like to enforce only specific characters in that field (e.g. only [a-z0-9]). For that purpose I would like to use Tcl/Tk's -validatecommand (or -vcmd for short), just as you do with the standard 'entry' widget:...

0
голосов
1ответов
1313 просмотров

Expect - does not force input to spawned process

package require Expect #### Log File Name ##### set logFile "mtte_result.log" set NextLine "\n" set RTSPrompt "RTS_Mon-> " exp_spawn plink.exe -telnet -P 10009 10.245.97.42 set spid $spawn_id #exp_send $NextLine flush stdout ##### Log the session to the File ######### exp_log_file -no...

1
голосов
3ответов
1460 просмотров

how to use Tcl's (interp) bgerror

I'm trying to run tclhttpd in a slave interpreter but slightly modified so as to run within a tclkit. The code below "runs" (I can hit http://localhost:8015) but never reaches the puts line at the bottom because "the server does not return, it enters [vwait forever]". But when I try "the after ...

2
голосов
2ответов
4568 просмотров

Windows resource editor for Linux

Is there any command line tool for Linux (FreeBSD, etc) which can modify like Resource Hacker versioninfo in exe file? There are some utils for that purpose under Windows, but I'm doing cross-building of Windows Tcl Starpacks on FreeBSD. Of cource it is possible to recompile TclKit with my vers...

10
голосов
6ответов
9947 просмотров

TCL vs Lua - scripting a mmo server

I have a c++ server side project that I need to embed some sort of scripting into. It is part of an online MMO type of server. I have significant experience using TCL, and it seems like the natural fit. I've done a minimal amount of Lua in my game dev days, and I wonder if this might be a better ...

4
голосов
1ответов
4048 просмотров

How to compile dll loadable in tcl

After trying many and searching web option to compile and load dll I could not able to create dll for tcl. Can you explain me how to do this.

8
голосов
1ответов
1861 просмотров

Steps to Create A Tcl Starkit on a Windows Platform

I am trying to figure out the basic steps to creating a Tcl starkit in Windows. I've asked a similar question before, as well as purchased a book on Tcl programming, visited wiki.tcl.tk, emailed Tcl programmers directly, etc... In all, I've received great feed back from my resources and this we...

22
голосов
2ответов
7695 просмотров

The Simplest Steps to Converting TCL TK to a Stand Alone Application

After running into major compatitiblity problems with C#, ASP.NET, MS Access, Linux, and Mono, I've decided to program in a language that is cross-platform, open source, and compatible with embedded databases that are also compatible with many platforms. I narrowed my choice down to TCL. Before...

0
голосов
1ответов
470 просмотров

Can't create file using TCL,which is executed through PHP

I have a PHP script that executes a TCL script . The TCL script creates a file , but when I execute through PHP (from browser) , tcl is not able to create a file. Can anyone guide me . //PHP code <?php $app = 'tclsh84'; $descriptorspec = array( 0 => array("pipe","r"), 1 => array("f...

0
голосов
2ответов
868 просмотров

Passing a file descriptor opened in C to a tcl interpreter for use

I have a C program in which I create a tcl interpreter. I then open a file in the C program and want to pass it onto the tcl interpreter so the tcl interpreter can do I/O on it. And I realize I could just open the file in the tcl interpreter, but I get an open file descriptor some somewhere else...

2
голосов
2ответов
2764 просмотров

How to make fread blocking and read until the end?

I am executing a TCL script from PHP using proc_open. I first open the TCL shell 2) Send a command using fwrite 3) What I need is fread to wait/block until the command sent by fwrite is complete and get all the contents .The command may take some time to complete. (I am able to read just 2 li...

4
голосов
4ответов
8757 просмотров

How do I create and iterate through a hash of hashes in TCL?

How do I create and iterate through a hash of hashes in TCL? If I have data like: foo = { a => { aa => { aa1 aa2 aa3 } ab => { ab1 ab2 ab3 } ac => { ac1 ac2 ac3 } } b => { ba => { ba1 ba2 ba3 } bb => { bb1 bb2 bb3 } ...