| View previous topic :: View next topic |
| Author |
Message |
topdawg_b Voice
Joined: 07 Dec 2008 Posts: 32
|
Posted: Fri Dec 12, 2008 12:05 pm Post subject: adding a linefeed. and wanting ascii and chr commands |
|
|
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 |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Fri Dec 12, 2008 12:29 pm Post subject: |
|
|
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 |
|
 |
topdawg_b Voice
Joined: 07 Dec 2008 Posts: 32
|
Posted: Fri Dec 12, 2008 2:22 pm Post subject: |
|
|
| the \r\n did the trick ty |
|
| Back to top |
|
 |
topdawg_b Voice
Joined: 07 Dec 2008 Posts: 32
|
Posted: Wed Dec 17, 2008 8:42 pm Post subject: |
|
|
| the scan $char "%c" int converts to an ascii number what prints a char from an ascii number |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Thu Dec 18, 2008 8:27 am Post subject: |
|
|
| 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 |
|
 |
topdawg_b Voice
Joined: 07 Dec 2008 Posts: 32
|
Posted: Thu Dec 18, 2008 7:50 pm Post subject: |
|
|
| thank you |
|
| Back to top |
|
 |
|