egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help about scan command

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
cerberus_gr
Halfop


Joined: 07 Feb 2003
Posts: 97
Location: 127.0.0.1

PostPosted: Thu Apr 01, 2004 7:08 am    Post subject: Help about scan command Reply with quote

Hello,

I have two sentences like:
Code:

good hello how are you.mp3            ::MORE:: 1.2KB 32/44 Mono [43s]
bad I_am_fine_thank_you.mp3          ::MORE:: 3.4MB 112/44 Stereo [3m32s]


(space between .mp3 and :: is <SPACE><CHAR 160>*<CHAR 160><SPACE>

and that's I want is to set in some variables some values, for the line 2:
Code:

set id "bad"
set file "I_am_fine_thank_you.mp3" (Not the spaces and chars 160)
set size "3.4MB"
set bit "112"
set time 3m32s


I have written this code:
Code:

scan $line %s%\[^[format %c 160]\]::MORE::%s%d%s nick file size quality length
set file [lrange $file 0 end];   # in order to remove the spaces in the front and the back
set bit [string trimleft $bit]

# I can set the length as 3m32s and if I use:
# scan $line %s%\[^[format %c 160]\]::MORE::%s%d%s[b]%s[/b] nick file size quality tmp length
# it doesn't work :(


Please help
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber