mIRC Home    About    Download    Register    News    Help

Print Thread
#97208 09/09/04 11:18 PM
Joined: Dec 2003
Posts: 28
L
LEET Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2003
Posts: 28
Hi,
I'm using echo -i for alignment now and I was just wondering if I can use a char or identifier in the line that would make the text go to the next line with the indent without wrapping. for eg.

'this is a test
next line!'

the point of this is that i wanted to know if it was possible, because it'd save me from using 2 echos.

Suggestions welcome


I R WITH STUPID -> LEET
#97209 09/09/04 11:33 PM
Joined: Sep 2004
Posts: 85
G
Babel fish
Offline
Babel fish
G
Joined: Sep 2004
Posts: 85
if you mean using 1 command and outputting 2 lines, this might help ya

Code:
 /echotest {
  /echo test1
  /echo test2
}
 


that makes it output 2 echo's, just from typeing /echotest, you can use this to add it to a script, but i'm not that good at advanced scripting, but this should help you

#97210 10/09/04 12:08 AM
Joined: Dec 2003
Posts: 28
L
LEET Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2003
Posts: 28
sorry I didn't make my question really clear, i just need the echo in 1 line to make my life easier the way I did a theme.

my theme reads from ini's and its laid out like
[event-name]
header=join
text=$nick blah blah blah

the header is just where it indents so it aligns and everything.
I just wanted to know if I could put a char or identifier in the 'text' section so it'd start a new line, so i can echo more aligned stuff. I hope this makes sense!


I R WITH STUPID -> LEET
#97211 10/09/04 02:28 AM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
You can create a custom alias such as $_echo which looks for a certain character (in this example $chr(10)) in the text and splits the echos up according to that character:

alias _echo {
var %o = $1
tokenize 10 $2
echo %o $*
}

Use this as an identifier where the first parameter is your color/switches/window name, i.e. //.echo -q $_echo(4 -e @Win,your text here) and $lf separates different lines in your text (character 10). The reason I suggest a custom identifier and not a /_echo alias is because it makes it easier to identify the settings parameters of the command

#97212 10/09/04 02:34 AM
Joined: Dec 2003
Posts: 28
L
LEET Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2003
Posts: 28
wow thanks for that, its a really good idea. I should have delimited the lines myself, I dunno why I didn't think of that. Maybe because I'm thick, but thanks for the code


I R WITH STUPID -> LEET
#97213 10/09/04 08:27 AM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
yoou might wanna put mirc's width into the equation if its for a theme


$maybe

Link Copied to Clipboard