mIRC Home    About    Download    Register    News    Help

Print Thread
#151120 13/06/06 11:15 PM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
i'm trying to write stuff to a text file and have it like this <p align= the align part i need to always be left then center then right.
i have tried var %align = left
if (%align == left) { %align == center}
if (%align == center) (%align == right }
it always comes out different and not like i want, how do i set it?

#151121 14/06/06 12:12 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
just curious, are you usding mIRC to write a webpage?
Or are you trying to format text in mIRC?

#151122 14/06/06 12:42 AM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
it's just a page. I can get it to align if i write it like align=left but i need to change the align variable each time

#151123 14/06/06 01:06 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I guess my point was that there is no "align" in mIRC, and if you are trying to format text in the mIRC windo you will have to come up with a different way to do it.

to say "its just a page" tells me nothing

#151124 14/06/06 05:24 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
how about u show us some REAL code, then we might be able to help, at least the section of code u think are important.

PS: the code u showed wasnt ever valid, line 2 uses ( instead of { and %align is attached to the incorrect (

#151125 14/06/06 06:54 AM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
ok
write htm.txt <p align=" $+ %align $+ ">

all i want to do is change %align to left, then to center then to right and always in that succession. like if it uses %align left to change it to %align center if it uses %align center change it to %align right , if it uses %align rightchange to %align left

#151126 14/06/06 09:32 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Short:

Code:
%align = $gettok(left center right,$iif($calc($findtok(left center right,%align,32) + 1) &lt; 4,$v1,1),32)


Long:

Code:
if (%align == right) %align = left
elseif (%align == left) %align = center
elseif (%align == center) %align = right

#151127 14/06/06 05:41 PM
Joined: Dec 2002
Posts: 79
F
Fantas Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
thanks Hixxy

#151128 14/06/06 10:09 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
hehe now i actually understand what he wanted, there is also the very short one of...

%align = $replacex(%align,right,left,left,center,center,right)


Link Copied to Clipboard