mIRC Home    About    Download    Register    News    Help

Print Thread
#33317 01/07/03 03:37 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Ok. Here is my issue. I've made a script that formats text and echo's my input with the applied format.

I've also got an on text event that is formatting text as well.


This is the format:

[timestamp] ($nick($nick,$chan).pnick) text


however, the problem is, that when I do an /amsg or /ame, the formatting for my input is lost. Is there any possible way in which I can keep the formatting?

This is my input script:

Code:
on 1:INPUT:#: {
  if (($hget(away,autoaway) == on) && ($hawayreason == $hidlemsg) && ($away == $true) && (%sysinfo != on)) {
    markback
  }
  if ($hnickcomp == on) {
    if ($1 != $null) {
      if (($left($1-,1) != $readini(mirc.ini,text,commandchar)) || ($ctrlenter == $true)) {
        var %x = $1-
        var %i = 1
        var %MAX = $numtok(%x,32)
        while (%i <= %MAX) {
          var %y = $gettok(%x,%i,32)
          if ((http:// isin %y) || (https:// isin %y) || ((www. isin %y) && (.com isin %y)) || (ftp:// isin %y)) {
            var %x = $replace(%x,%y,$chr(31) $+ %y $+ $chr(31))
          }
          inc %i
        }
        tokenize 32 %x
        if ($fline(#,$replace($1,:,*),1,1)) {
          var %nick = $nick(#,$ifmatch)
          if ($hncolour == off) {
            if (($2 != $null) && ($chr(58) isin $1) && (($1 != :P) || ($1 != :p))) {
              .msg $active  $+ %nick $+ : $2-
              echo -tmi1 $chan ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ )  $+ %nick $+ : $2-
            }
            else { 
              .msg $active $1-
              echo -tmi1 $chan ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ ) $1-
            }
          }
          if ($gettok($hncolour,1,32) isnum 1-15) {
            if (($2 != $null) && ($chr(58) isin $1) && (($1 != :P) || ($1 != :p))) {
              .msg $active  $+ $gettok($hncolour,1,32) $+ %nick $+ : $2-
              echo -tmi1 $chan ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ )  $+ $gettok($hncolour,1,32) $+ %nick $+ : $2-
            }
            else { 
              .msg $active $1-
              echo -tmi1 $chan ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ ) $1-
            }
          }
          halt
        }
        .msg $active $1-
        echo -tmi1 $chan ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ ) $1-
        halt def
      }
    }
  }
  if ($hget(away,warned) == 1) {
    .hdel -s away warned
  }
}



I have searched the forums, but I couldn't find any thread which addressed, or asked about this issue.


--------
mIRC - fun for all the family (except grandma and grandpa)
#33318 01/07/03 05:25 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
ON INPUT is triggered when u type something in the editbox
so u can make an alias for /msg and /say which will trigger this event, u can use /editbox -n which will put the text in the editbox of the window and press the enter key, and that will trigger this event

#33319 01/07/03 01:35 PM
Joined: Apr 2003
Posts: 426
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Wheee! I think I've got it!.

I'll use a comchan loop and a few other mad arse thingies!




Score!


I'll post my complete script for this so y'all can take a peek!


--------
mIRC - fun for all the family (except grandma and grandpa)

Link Copied to Clipboard