I'll check it out, thanks...and don't feel like your advice was simply rejected; I made the original post right before leaving for the Thanksgiving weekend and didn't even check anything until I got back - when I got to it, the string thing just seemed the easier way to go, that's all, I didn't...
This is expect-specific, and very weird.
Basically, I've created a routine that telnets into certain devices, executes commands, expects a certain range of output depending on the command, then sets the output to a variable which is then searched for certain conditions. For example, it will...
Ahhh...you know I thought it was odd that I couldn't specify where in the string to start the search. It's my dusty old version of Tcl (it's the one packaged with Expect 5.21). That did the trick - that trick broke my scripting block and I've created a generic index/slot finder that this whole...
Thanks, AviaTraining, as always for the time and effort...I'd been grinding through my string options for a while now. I couldn't find any other commands that seemed to suit my needs - I use a string match earlier in the script to determine whether the state exists at all, then I needed another...
This seems like it should be simple but for the life of me I can't seem to peg this; I'm using expect to telnet into a device and issue commands. What I want to do is then expect certain things in the output, and then execute other commands based on what it sees. The problem is, I need it to...
Thanks - although I had figured a way around it, the extra info is helpful and is actually going to make things a lot simpler than I had it originally!
I'm working on some test tools using expect, and I want to create a series of functions that each issue a series of commands to check and gather output. I'd like to be able to use these as part of a library which can be called from other scripts, but I'm running into the following problem...
I've got a text widget that I've associated with a variable (x), and I'm trying to cause text messages to appear in the widget, with a pause in between each message. I tried the following:
$x insert end "Message 1\n"
after 300
$x insert end "Message 2\n"
after 300
$x...
Thanks for the advice...I tried that; it wrapped, but then when I launched the executable, I got this error in the console:
Error sourcing /TCL/lib/x01/x.tcl: can't find package Iwidgets 4.0
This seems to be because of the line in the script:
package require Iwidgets 4.0
However, if I remove...
I've come up with a little Tcl script, and it runs fine if you have Tcl 8.3.4.2 installed on your machine...however, I'd like to use Freewrap to distribute it. When the wrapped program is used on a station which doesn't have Tcl installed, however, people get the error:
Error: can't find...
I'm trying to use freewrap to convert my TCL script to an executable; it works, and the script launches ok, but it's choking on all my Expect commands (this tool is used for automation testing so I use expect a lot). Is there any way to make freewrap and expect play nicely together that anyone...
This is probably simple, but I can't seem to find the answer to this one; I'm building a tool that uses a lot of text widgets to display output, status messages, etc. and each widget uses a scrollbar.
I've got the messages etc. directed to the text widget without any problems and it works well...
I'm calling a proceedure that needs to be passed a series of variables, and I want one of the variables passed to be a list.
Basically, I have a while loop and for each iteration of the loop at one point it checks a series of radiobuttons and makes a list based on each one which has been...
Using Tk, I've created a series of buttons for a series of slots, and I've grouped the buttons into groups of 2. These buttons are packaged in frames as in the example below:
frame .slot1and2
button .slot1and2.slot1board1
Later, I call up a proceedure to cycle through different board types...
That did it...many thanks! I really appreciate you taking the time to walk me through that, I don't have any formal Tk/Tcl training and I'd been messing with that problem for quite a while! Thanks a bunch!
I tried that, and also I tried it as an array $x($c) but it still doesn't work...it claims that it doesn't know anything about that variable...
The way I'm creating these is to say
while { $c <= 32 } {
radiobutton .node$c.type1010 -variable x($c) -relief raised -borderwidth 1 -text...
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.