This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Tue Oct 09, 2007 5:21 am
Thanks alot but I did'nt get that.. Can you please be more specific
Thanks
|AmDeAtH @ Undernet
Death is only the *Beginning*...
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Tue Oct 09, 2007 5:36 am
Keep in mind that lrange returns a list, not a string..
Might want to join it into a string before trying to scan it.
Code: Select all
set then [clock scan [join [lrange [split $text] 3 end]]]
The timestamp you mentioned should work just fine with "clock scan":
Code: Select all
[11:31] > .tcl clock scan "Mar 07 21:22:37 2006 EST"
[11:31] < Tcl: 1141784557
NML_375
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Tue Oct 09, 2007 10:29 am
Thanks alot nml
The problem was coming because I was using lrange 3 end when 2 end was needed
Thanks alot soo much, you guys rock.
iamdeath
|AmDeAtH @ Undernet
Death is only the *Beginning*...
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Tue Oct 09, 2007 2:32 pm
Clock scan is picky about the format you give it, the manpage doesn't say it but the commas shown in the example formats are necessary. EG:
day, dd monthname yy or
monthname dd ?, yy?
There's a little more detail here:
http://forum.egghelp.org/viewtopic.php?p=67017#67017
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Wed Oct 10, 2007 12:49 am
Thanks alot rosc, that helps much.
Thanks once again
iamdeath
|AmDeAtH @ Undernet
Death is only the *Beginning*...