mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2008
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2008
Posts: 3
Whenever someone copy/pastes something into Mirc that includes a tab space and sends it to me I get a small black box where the tab should be. Is there a way I can make it showup as say...3 spaces instead?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This is font dependent.
The tab key (ascii character 9) will show properly if the correct font is used. The most common fonts will show it correctly, so you are either using a font that is not one of the most common (ie: not Fixedsys or Times New Roman)

Note: I only named two fonts, but there are a lot more. The two I named are the two I use on a regular basis, and I have no problems with any of the characters showing incorrectly.

If the person sending you the information sees it correctly, you should find out which font they are using.

On the other hand, if they are sending it to you as a text posting, rather than via a DCC'd file, you might try this code.

Code:
on ^*:text:*:*:{
  if $chr(9) isin $strip($1-) {
    echo $iif($chan,$v1,$nick) $replace($1-,$chr(9),$+($chr(32),$chr(2),$chr(32),$chr(2),$chr(32)))
    haltdef
  }
}


Note: This code was generated on the spot, so I don't guarantee that it will work, but the theory is sound.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on ^*:TEXT:*:*: {
  if ($regex($1-,/(\t)/g)) { 
    echo -amt < $+ $nick $+ > $replace($strip($1-),$regml(1),$chr(32) $chr(2) $chr(32) $chr(2) $chr(32)))
    haltdef 
  }
}


The above code shall fix your problem.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
With the exception of the fact that your code uses regex, what, if any, difference is there between what I posted and what you posted? If there isn't any, why would your code be preferable?

Just curious.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Hi, RusselB, they are indifferent. And I don't mean to sidetrack your answer in reply to the op. Just thought I'd offer another example of using regex. No offense intended.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
None taken. I'm trying to learn how to use regex, but due to several problems my learning has been extremely sporadic, so I wondered if there was a specific reason that you used regex, such as catching something my code wouldn't have.

Joined: Nov 2008
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2008
Posts: 3
Ok i'm a total noob so I apologize, where do I put this code lol?

EDIT: Ok figured out where to put it, it works for plain text chat, however it doesn't work when someone enters a /me line which is usually how it comes. Is there a simply mode to make it work for those?

Last edited by shipitkthx; 06/11/08 05:55 PM.
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on ^*:ACTION:*:*: {
  if ($regex($1-,/(\t)/g)) { 
    echo -amt < $+ $nick $+ > $replace($strip($1-),$regml(1),$chr(32) $chr(2) $chr(32) $chr(2) $chr(32)))
    haltdef 
  }
}

should solve the "/me" problem you had.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Nov 2008
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2008
Posts: 3
Figured it out myself, just changed on Text to on Action, thank you everybody for the help.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can put both on text and on action event together in the same remote, just in case of one types in the active channel and the other types text via /action, /describe or /me.


Link Copied to Clipboard