mIRC Home    About    Download    Register    News    Help

Print Thread
#225677 07/09/10 08:22 PM
Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
Hi,

To display the text i write i have this alias:
Code:
alias -l chmsg { .msg $1- | echo $timestamp $+( ,$me,) says: $2- }


what i write looks like this:

Code:
RiMaJoy says: bla bla bla


and on long text like this:

Code:
RiMaJoy says: bla bla bla bla bla bla bla
bla bla bla bla bla


the next line starts under my name

What i would like and can't get done is for the text to look like this:

Code:
RiMaJoy says: bla bla bla bla bla bla
              bla bla bla bla bla bla
              bla bla bla bla bla bla
              bla bla


i feel like a goat but anyways any help on how its done ?

Greetz

Joined: Jan 2009
Posts: 116
Vogon poet
Offline
Vogon poet
Joined: Jan 2009
Posts: 116
use the -iN switch for /echo.


http://zowb.net

/server -m irc.p2p-network.net -j #zomgwtfbbq
(ssl on port 6697 and 7000)
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Please note that the usage of the -iN switch in the echo will only affect how you see the text. It does not affect how others see the message you are sending.

Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
Somehow the -iN doesn't work frown
I made it like this:

Code:
alias -l chmsg { .msg $1- | echo -at $+( ,$me,) says: | echo -aiN6 $2- }


Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
N is just there to show you that you should put a number there. You'd use -ai6 instead of -aiN6. And if you want the text starting on the same line as "nick says:", then you can put the -i6 and $2- in that first echo.

I'm a bit curious why you're using $2- instead of $1-, though. Typo?


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
I tryed it like echo -i6 aswell
still nothing that is why i thought the N was needed also

no typo i got the code like this from someone.
i checked it on the code i got $1- returns #channelname bla bla bla
That is why $2-

Now to get this echo thing working grrrr

Last edited by RiMaJoy; 08/09/10 03:52 PM.
Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
Code:
alias -l chmsg { .msg $1- | echo -at $+( ,$me,) says: | echo -aiN6 $2- }


So it's an alias you call every time you want to do this, rather than triggering on an event such as ON INPUT. It makes sense to use $2- since $1 is the target you're messaging.

As for -i, it indents on following lines if word wrap needs to be applied. IE, if you do -i6, and the message is spread over three lines, the second and third line receive 6 spaces in front, which makes it easier to tell where new lines start. It does not apply to the first line, and since you're echoing the lines individually, mIRC considers every line to be the first line of a new message.

If you insist on echoing each line individually, you'd have to create the "spaces" yourself. mIRC doesn't work well with spaces. A cheapskate version could be to insert $chr(160) in front, which looks like a space in most situations (but could look like something else). If you want actual spaces, you need to use an external .dll such as spaces.dll.

Do you want to manually trigger when your script applies and when not? If not, you could use the following code instead:

Code:
on ^&*:input:#: {
  if !$ctrlenter && $left($1, 1) != / && $left($1, 1) != $readini($mircini, text, commandchar) {
    .say $1-
    echo -ai6t $+($chr(2), $me, $chr(2)) says: $1-
    haltdef
  }
}


Learning something new every day.
Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
i was trying to wrap it at the first line.
and was testing it with only the word test.
Well i guess i have to do with the second line starting the wrap smile

thanks for helping me out.


Link Copied to Clipboard