mIRC Homepage

/write text formatting question

Posted By: fallen248

/write text formatting question - 20/04/05 07:53 AM

ok im writing a script to take my old sites.dat file from flashfxp and create a bookmark file for gftp on linux. the problem being the text formatting.

the variable i have all work, the script gets the info, my problem is that i need no spaces and in the first line i need it formatted that exact way.

remote directory=/
local directory=

i need the file to be named bookmarks, my problem is i have tried many ways of using /write and /writini and i cannot get it to format without spaces and with the brackets.

Any help would be greatly appreciated.
Posted By: Kelder

Re: /write text formatting question - 20/04/05 09:21 AM

//write file.txt $+([,%channame,/,%currenttopic,])
//write file.txt [[ $+ %channame $+ / $+ %currenttopic $+ ]]
//write file.txt $chr(91) $+ %channame $+ / $+ %currenttopic $+ $chr(93)

$+ removes the space you'd normally get, same for $+()
use [[ or $chr(91) for [ if it's surrounded by spaces, if it's not, then you can use [

to get the correct number for $chr, either use $asc(character) to get it or use this script to list them all (put next lines in a file in remotes), then type /chrt somewhere to get a new window with all characters and their codes)
; make a chart with all ascii codes and their hex, oct and decimal codes
alias chrt {
var %i = 0
window -ln @chrt 0 0 125 500
clear @chrt
while (%i <= 255) {
aline @chrt 14 $+ $right(0 $+ $base(%i,10,16),2) $+ 10 $+ $&
$right(000 $+ $base(%i,10,8),4) $+ 08 $+ $base(%i,10,10,4)  $+ $chr(%i)
inc %i
window -r @chrt
Posted By: fallen248

Re: /write text formatting question - 24/04/05 12:22 AM

Thanks alot, that worked for the first line. But when i tried to copy it for the others it didnt.

What would the other lines look like?
Posted By: fallen248

Re: /write text formatting question - 24/04/05 01:20 AM

nevermind, i got it. thank you for the help
© 2020 mIRC Discussion Forums