Version 0 of Console - getting width from console interp

Updated 2013-01-21 19:26:54 by AMG

Zipguy (2013-01-21) - You can find out my email address by clicking on Zipguy.

It started from this

"I did look at the console eval which is cool! Thanks for that. Not quite sure if I fully understand that yet. If I wrote a command like this:

 console eval {winfo geometry .}

it would not display in the console. However if I typed it into the console, it would display in there: 483x177+79+28 or something like that. One of the things on my to do list is to increase the width of the console, which would be nice to be able to retrieve the answer of 483 wide pixels from the console, and add 100 pixels to it, then format it to $geospec and give the command:

  console eval {wm geometry $geospec}

but that command would say

 can't read "geospec": no such variable

"

which was on another page (namely console - work with the parent window). I tried writing a program which would attempt to retrieve the console's width (and more) from the console's window manager. I got this far.

        #  zipguy - routine added for puts with date %Y-%m-%d and time 
proc puts_log {message {nr no} {pt pt}} {
        if {$nr == "nr"} {
                puts -nonewline " $message"
        } elseif {$pt == "pt" } {
                set time [clock format [clock seconds] -format "%Y-%m-%d %I:%M:%S %p"]
                puts "$time  $message" 
        } else {
                puts ""
        }
};# END-PROC

 console show
 set geospec "Unset"
 puts_log "geospec is: $geospec"

# console eval [ after idle {return }]
 console eval [ set a [list wm geometry .]]
# console eval {[consoleinterp [list set $geospec {$a}]]}
 puts_log "geospec is: $geospec"

Some of the lines I've been trying to get to work (with "console eval {}") are incorrect and don't seem to work. What I tried doing was making a list out of wm geometry . which did not seem to be accepted either. However, they do seem to work when they are typed into the console.

http://www.geocities.ws/thezipguy/misc/width_from_console.png

I don't know what I'm doing wrong, I must be dumb. Thanks for any help, that anyone, can provide to me.