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 

adding a linefeed. and wanting ascii and chr commands

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Fri Dec 12, 2008 12:05 pm    Post subject: adding a linefeed. and wanting ascii and chr commands Reply with quote

hi im using.
set out [open $recfile$ext w]
puts $out $text
close $out
everything works in the program fine but when the textfile is opened with wordpad all the text is on 1 line.
what can I add to $text to make it put a linefeed or new line command that the worpad would recognize

2. in mirc they have a $chr(num) command thats prints an ascii character and a asc("char") command that gives u the ascii number of a character. does eggdrop have such commands?

thanks . this is a great site
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Fri Dec 12, 2008 12:29 pm    Post subject: Reply with quote

1. Are you making this file under some Linux OS and after that u trying to look into it under windows OS?

for linux can be \n, for windows can be \r\n or just \r, try.

2. try
Code:
set char "a"
scan $char "%c" int
puts $int
Back to top
View user's profile Send private message Visit poster's website
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Fri Dec 12, 2008 2:22 pm    Post subject: Reply with quote

the \r\n did the trick ty
Back to top
View user's profile Send private message
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Wed Dec 17, 2008 8:42 pm    Post subject: Reply with quote

the scan $char "%c" int converts to an ascii number what prints a char from an ascii number
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Thu Dec 18, 2008 8:27 am    Post subject: Reply with quote

topdawg_b wrote:
the scan $char "%c" int converts to an ascii number what prints a char from an ascii number


Code:
set char [format %c $int]
Back to top
View user's profile Send private message Visit poster's website
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Thu Dec 18, 2008 7:50 pm    Post subject: Reply with quote

thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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