Yes I did I have to remove one set of brackets Avia. I had added the outer parenthesis because the variable subsitution wouldn't occur if the list had simply been quoted with the {}, but I removed the inner brackets after you made the point about the double-quotes. Marsd your solution works in...
ahh...i didn't look at the range command, or see any examples in the book. Well thanks guys, both of your methods seem to work. I finally got it working here. Thanks a lot!
The output i got when i used that code marsd was
\{00{}27{}42{}42{}03{}00{}00{}02{}02{}0C{}00{}00{}00{}22{}22{
What I'm looking to do is to change this: {00 27 42 42 03 00 00 02 02 0C 00 00 00 22 22 22 22 22 01000000 00 00 22 22 22 22 22 23 00 01 00 00 00 00 0A 00 00 00 }
to this: {00 27...
I suppose if I could find a way to do it just by using the value as a string, that would work just as well since the value is a string before I insert it into the RSTPattern list. I am looking into using the string trim commands to do this. So if this would work, I could just set the list like...
well it should be treating 01000000 as a single list element, element 18, so I guess what I need to figure out is how to divide this up into separate elements in groups of 2.
I have a list variable, RSTPattern, with value:
{00 27 42 42 03 00 00 02 02 0C 00 00 00 22 22 22 22 22 01000000 00 00 22 22 22 22 22 23 00 01 00 00 00 00 0A 00 00 00 }
I'd like to know how I can add spaces between the values that currently do not have spaces, as this is required. I am trying...
I think I may have it anyways. Maybe i made it more complicated than it needed to be. I'll look into the uplevel command though, but it initially seems like the following code is going to work. I'll keep hacking away at it anyways though.
proc myproc2 { } {
if { $::Chec1 != 0 } {...
I believe I tried that before too. I just tried it now and received a stack trace error which reads: can't read "b": no such variable while executing set txport "::Chec$b"
I believe the value is being set in the for loop, but when I try to view it in the procedure after the...
In the for loop I'm trying to increment the value of b for each checkbutton I create. If I take the [] off, it only sees the variable for the buttons created as ::Chec (Says can't read "::Chec" no such variable) when I am trying to get it to see ::Chec0, ::Chec1,...etc. However, when...
I am trying to figure out how to recieve the value from a checkbutton when that button is in the on position and a user clicks an entry button. I've been trying a bunch of different methods to get the value to be set in the myproc2 procedure but am having no luck. This is a snippet of the code...
I have a frontend I created that I use to run various scripts. I am trying to open up a second widget through one of the scripts to field user data. The problem is, when I try to do that the second window doesnt appear (although it appears when the widget code is run independently). I tried...
OK thanks Ulis...I actually ended up doing it another way before I read your reply. The program is designed to submit a series of onvalues when a button is clicked, and instead of making the GUI interact with the checkboxes before the button is clicked, I just put a series of if statements in...
I have a group of checkboxes that have independent onValues associated to them. I am trying to find a way to create a list using these checkboxes, so that when a checkbox is selected its onValue is added to this list (named portList) and when it is deselected it is removed. I'm not sure if I...
I see...so you just have to make procs1-3 subcommands of the original calling procedure. Thanks a lot for your help Ulis...being new to TCL and somewhat new to programming, it's taken a while for me to figure some of this stuff out. I think that should solve the problem though. I appreciate it.
Would it be possible to send the output of multiple entry fields to multiple procedures via one button click? It looks as though you can only associate one command to one button. I thought maybe I could circumvent this through the configure subcommand after the first procedure processed, but...
I am starting out with TCL/TK and am trying to create a Data-entry GUI. I am using two books as resources, yet I don't see any examples of data entry that are based on button-clicks (rather than entry KeyPresses). All I want to do right now is to take the info in the entry box (or boxes) and...
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.