set fp [open sublist.txt]
while {[gets $fp line] != -1}
{
send "$line\r"
sleep 1
}
close $fp
------------
and here is the error I get:
wrong # args: should be "while test command"
while compiling
"while {[gets $fp line] != -1}"
(file "./dap_fleets.exp" line 45)
-------------
Any ideas?
Thanks,
-Brian
Sent via Deja.com http://www.deja.com/
Before you buy.
'Ts instructive how variable even "word for word" can be, eh?
--
Cameron Laird <cla...@NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
The { has to be on the same line as the while, due to Tcl's syntax.
while {[gets $fp line] != -1} {
send ...
}
Otherwise, "while" thinks you only gave it the test and not the command.
Hence,
> wrong # args: should be "while test command"
--
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST). Cryptokeys on demand.
"No wonder it tastes funny.
I forgot to put the mint sauce on the tentacles."