mIRC Home    About    Download    Register    News    Help

Print Thread
#58630 01/11/03 07:10 AM
Joined: Oct 2003
Posts: 10
D
digian Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Oct 2003
Posts: 10
Is there a simple way to align nicknames / messages in the message window ... im looking to get a justified effect like so :

-------------------------------------------------
.....<johndoe> hello
.........<betty> hi
...........<mat> greetings
...<cleopatra> welcome
------------------------------------------------

or alternatively:

-------------------------------------------------
<johndoe>........ hello
<betty>........... hi
<mat>............. greetings
<cleopatra>...... welcome
------------------------------------------------

Please ignore the .... it was just to show the tabbed effect im after.
Thanks in advance.

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Procided you use a fixed width font, there is. If you use a proportional font, it is not. You also won't be able to use the "use single message window option" in mIRC.

Code:
[color:green]; catch messages[/color]
on ^*:TEXT:*:?: {
  [color:green]; check if window exists, if not - open it[/color]
  if (!$window([color:blue]@messages[/color])) window [color:blue]@messages[/color]
  [color:green]; aline the text, but parse the nick through a identifier first[/color]
  aline [color:blue]@messages[/color] $wid($nick) $2-
  [color:green]; haltdef the default message procedures[/color]
  haltdef
}
[color:green] [/color]
[color:green]; custom identifier - adds spaces or any other character to align stuff[/color]
alias wid {
  [color:green]; adds &lt;&gt; to the nick, you can change the following options:[/color]
  [color:green]; N - ASCII code for the character you want to use to align - 32 for space, 46 for .[/color]
  [color:green]; M - width of nick column - align over M characters[/color]
  return $+(&lt;,$1,&gt;,$str($chr([color:blue]N[/color]),$calc([color:blue]M[/color] - $len($1))))
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Oct 2003
Posts: 10
D
digian Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Oct 2003
Posts: 10
Well I added this to remotes and it didnt seem to affect any text alignment, all it did was show replies from private chats in @messages. The main channels text wasnt affected.

Is there a way to parse it without having this @ window in between ? No doubt im missing something, as im new to this .. but please help.

I did change the variables for chr and amount of spaces.
No luck yet.

Thx.

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Hmm. you mean you are talking about channel text? According to your original question, you were talking about queries...

If you want it for channel text, just add the following:

Code:
[color:green]; catch channel text[/color]
on ^*:TEXT:*:#: { 
  [color:green]; echo text but parse the nick through a identifier first[/color]
  echo # $wid($nick) $1-
  [color:green]; haltdef the default procedures[/color]
  haltdef
}


PS: in the original code I gave, change $2- to $1-


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard