10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need some help with regexp in tcl. The following code does work if the $urlvar ends in jpg,jpeg,png or gif. Eg, protocol(http/https)://testsite.com/images/image1.jpg
if { ! } {
//Do something
}
My problem is that if the URL does not end in these extensions this regexp is of no... (1 Reply)
Discussion started by: ampak
1 Replies
2. Shell Programming and Scripting
Hello everyone,
What is the difference between these two tcl commands:
(A) --> puts "ERROR!!! ${current_name}/${opt} is not found."
(B) --> puts "ERROR!!! $current_name/$opt is not found."
Are the braces needed to be put? Or both A and B has the same output? (5 Replies)
Discussion started by: mar85
5 Replies
3. Shell Programming and Scripting
Hello everyone,
I'm new in tcl scripting.
I'm currently studying a tcl script and came across this line:
regexp {(\d+)(\S?)} $opts match opt swi
According to my understanding, this line means to search in the opts variable for one or more digit, followed by a non-whitespace character... (2 Replies)
Discussion started by: mar85
2 Replies
4. Shell Programming and Scripting
how can i make a list with the n last files and their details in tcl?..
thanks. (0 Replies)
Discussion started by: eee
0 Replies
5. Shell Programming and Scripting
Hey,
Can anyone tell me what is the default tcl button color is?
I've already tried gray60/70/80/85/90/95.
None are the same.
Thanks,
Phil.
-----Post Update-----
You can disregard this question, found the color in #E0DFE3 (0 Replies)
Discussion started by: Phi01
0 Replies
6. Programming
Hello guys, please help me
I want to use TCl to move the lines with line number as odd number to a new file source_odd.txt, and move the lines with character 'a' to another file source_a.txt.
I also want to create a tcl function to list all the file names in a appointed directory. (1 Reply)
Discussion started by: kunleoyafajo
1 Replies
7. Shell Programming and Scripting
Hello,
Can someone explaine me the meaning of this program:
#! /usr/bin/tclsh
set mctal
set a
set b
set c
set d
set e
while {! line cell]} {
}
while {! line]} {
}
while {! line cell]} {
}
while {! line]} {
} (0 Replies)
Discussion started by: jolecanard
0 Replies
8. Shell Programming and Scripting
Does any one know how to capture the output of command called from a TCL script?
I cannot figure this out. I've been working on it for 4 hours now :confused: (2 Replies)
Discussion started by: Lorna
2 Replies
9. Shell Programming and Scripting
Hello Tcl Experts,
set i 0
while { $i < 10 } {
puts "$i"
incr i
}
I am trying to print the value of "i" at the same place. i.e. it should first print "1", then in next iteration print "2" over the location of "1" and so on.... (i.e. in every iteration, delete the previous number and... (2 Replies)
Discussion started by: sumitgarg
2 Replies
10. Shell Programming and Scripting
can someone tell my why the puts is not reflecting the variable?
CUT -->
set fp
while {-1 != } {
button .a${line} -text "${line} " -width 20 -command {
puts $line
}
pack .a${line}
} (0 Replies)
Discussion started by: hpuxrox
0 Replies
datefield(3tk) Tk datefield widget datefield(3tk)
__________________________________________________________________________________________________________________________________________________
NAME
datefield - Tk datefield widget
SYNOPSIS
package require Tk
package require datefield ?0.2?
::datefield::datefield widgetpath ?options?
_________________________________________________________________
DESCRIPTION
The datefield package provides the datefield widget which is an enhanced text entry widget for the purpose of date entry. Only valid dates
of the form MM/DD/YYYY can be entered.
The datefield widget is, in fact, just an entry widget with specialized bindings. This means all the command and options for an entry wid-
get apply equally here.
COMMANDS
::datefield::datefield widgetpath ?options?
Creates and configures a date field widget.
OPTIONS
See the entry manual entry for details on all available options.
EXAMPLE
package require datefield
wm title . "Datefield example"
proc DayOfWeek {args} {
set now [clock scan $::myDate]
set ::myDate2 [clock format $now -format %A]
}
trace variable myDate w DayOfWeek
::datefield::datefield .df -textvariable myDate
label .l1 -text "Enter a date:" -anchor e
label .l2 -text "That date is a:" -anchor e
label .l3 -textvariable myDate2 -relief sunken -width 12
grid .l1 .df -sticky ew
grid .l2 .l3 -sticky ew
focus .df
SEE ALSO
clock(3tcl), entry(3tk)
KEYWORDS
clock, entry, widget
COPYRIGHT
Copyright (c) Keith Vetter <keith@ebook.gemstar.com>
datefield 0.2 datefield(3tk)