mIRC Homepage

Problem with tab spaces showing up as boxes

Posted By: shipitkthx

Problem with tab spaces showing up as boxes - 04/11/08 11:56 PM

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?
Posted By: RusselB

Re: Problem with tab spaces showing up as boxes - 05/11/08 12:35 AM

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.
Posted By: Tomao

Re: Problem with tab spaces showing up as boxes - 05/11/08 04:30 AM

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.
Posted By: RusselB

Re: Problem with tab spaces showing up as boxes - 05/11/08 06:12 AM

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.
Posted By: Tomao

Re: Problem with tab spaces showing up as boxes - 05/11/08 06:42 AM

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.
Posted By: RusselB

Re: Problem with tab spaces showing up as boxes - 05/11/08 06:50 AM

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.
Posted By: shipitkthx

Re: Problem with tab spaces showing up as boxes - 06/11/08 05:31 PM

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?
Posted By: sparta

Re: Problem with tab spaces showing up as boxes - 06/11/08 05:57 PM

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.
Posted By: shipitkthx

Re: Problem with tab spaces showing up as boxes - 06/11/08 06:02 PM

Figured it out myself, just changed on Text to on Action, thank you everybody for the help.
Posted By: Tomao

Re: Problem with tab spaces showing up as boxes - 06/11/08 06:33 PM

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.
© 2021 mIRC Discussion Forums