Skip to content
mIRC tutorials

Mirc Theme Alignment...

A TG007 community discussion started by Kronicdreamer.

Discussion 25 posts
Page 1 of 2
Open
Topic #11174 · 25 published posts · 11,832 views

I Personally love Aligned themes... even if the colors are horrid :P and since i have posted SS's of mine, i have had 15+ pple ask me how to align a theme so i will give you the basics. And if you search Google as i did befor i knew how, youll see there isnt any tutorial on manual theme alignment, just mts junk.... so.....

 

Lets start w/ the Alias...

 

  alias thalign return $str($chr(160),$calc(15 - $len($nick)))

 

All it is, is $str() w/ $chr(160) "space" , and total of 15 which you can change to align whereever away from the left...

15 - $len($nick) is the 15 total spaces minus the length of the nick talking which aligns everything...

 

also make a timestamp alias which will come in handy if you use one....

 

alias thtime return $asctime(hh:nn)

 

ok here it is working...

 

on ^*:TEXT:*:#: {
   echo -i35 # $thtime $thalign $nick **[spacer] $1-
   halt
}

 

-i35 will space any runover on the next line to align w/ the nick from above...

It WILL have to change w/ any changes to the total $chr(160)'s to make it align correctly...

 

**[spacer] REPLACE this with : or any symbol so itll break the nick from the persons text ($1-)

If you use | either make it a %var or use color code around it or itll break the $1- for the next line which will not work...

 

Next is an example of join/part...

Alias... which is a lil different to align these and will work for Quit which youll havta loop to the common channels...

 

alias thjpq return $str($chr(160),14))

 

on ^*:JOIN:*: {
  echo # $thtime $thjpq J $nick | halt
}

 

This is my 1st Tutorial, so it prolly aint neat nor 100% accurate, but you get the point...

 

On INPUT statement...

start w/ alias like always... All is similiar to past alias...

 

 alias thme return $str($chr(160),$calc(15 - $len($me)))

 

Here is the on input in action...

echo 1st, msg 2nd and theme should work...

 

on &*:INPUT:#: {
  if (/* !iswm $1) {
  echo -i35 # $thtime $thme $me **[space] $1-
  .msg $active $1-
  halt
}
}

 

change # to ? and $active to $nick and itll work in Queries....

***fixed to allow /cmds

 

 

** Also will ONLY work w/ fixed width fonts!

 

** Will edit more in, and extend on whats here later **

Edited Sep 21, 2008 8:18 PM by Kronicdreamer

Hey, thats cool have always wonderd how people have made them.

 

Its been a long time since i've done anything like this and i've fogotten to make the theme work when I type?

 

Its something along the lines of

 

on 1:INPUT:#: {
  echo -i35 # $thtime $thalign $me : $1-
  msg # $1-
  halt
}

 

I fully can't remember. Help lol

added on input :)

also only works correctly on mono spaced fonts

so not all the fonts will work correctly

 

consolas in vista is a new fixed width font

Edited Sep 18, 2008 2:45 PM by Ozzy10

My code does NOT have bugs. It just develops random features.

i mentioned it.. thanks ozz

 

Windows XP: New Courier

Vista .. what ozz mentioned

 

Linux: FreeMono

2 questions:

 

When i want to type /join #room or /hop or really anything, now it just messages it to the room instead of doing it? How can i fix this.

 

Secondly as i'm typing now the time says 10:09am when really its actually 10:40am?

Yeah, that's something he left out. Just do ..

on &*:INPUT:#: {

if (/* !iswm $1) {

echo -i35 # $thtime $thme $me **[space] $1-

.msg $active $1-

halt

}

}

Edited Sep 20, 2008 10:48 PM by X-Fusion

Thanks X-Fusion, thought it was something like that. I haven't done any theming since the good old msn days!

 

I also figured out the time problem. It should be...

 

alias thtime return $asctime(hh:nn)

 

in mIRC the format for minutes is nn not mm. Seems silly but it is what it is

Not all networks have the same nick length, so you must accommodate that.

 

You can do so by retrieving the raw on connect. and using a variable. or a hashtable. Would prefer a hashtable so you can access it quicker.

 

Also, your on INPUT will return the basic mIRC format when using a /command

 

on *:INPUT:*:{
 if ($left($1,1) == /) && (!$ctrlenter) { return }
 else {
   haltdef
   !.msg $active $1-
   echo -ai<# characters to indent> $me $1-
 }
}

 

That should take care of the / problem.

 

Also, to keep it perfectly aligned, i suggest use the i parameter in echo, like i showed in the above.

thats some goofy looking coding Lol

I've never been able to get the -i switch to work...

 

/echo -i4ta $chan [ $nick ] $1-

 

I end up using $chr(160) ... Any ideas?

 

 

It probably looks funny cuz its not MSN IRC code lol ... or is it the haltdef at the top?

 

Or mebbe it's the !.msg ....

..oh no...another Josh. :( I simply cannot have this...

Edited Nov 8, 2008 12:38 AM by Josh`

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

There's only one dren ....

I've never been able to get the -i switch to work...

 

/echo -i4ta $chan [ $nick ] $1-

 

I end up using $chr(160) ... Any ideas?

 

 

It probably looks funny cuz its not MSN IRC code lol ... or is it the haltdef at the top?

 

Or mebbe it's the !.msg ....

 

 

Travis, the since you have no other switches with parameters that follow, place the i4 at the end. And the indentation only works if the line is overlapping. So if it has to extend to a new line, it will indent 4 characters. otherwise, it's left alone.

 

and the !.msg just simply uses the built msg alias ( the "!" does that ) and makes it so it doesn't show in your window, or so it's hidden ( the "." does that ).

 

thats some goofy looking coding Lol

 

That's what actual mIRC scripting language ( mSL for short ) looks like. It takes a while to get ahold of most of the tricks, i've been scripting mSL as a hobby for 3 years. and PHP for 6 months. aswell as xhtml/CSS/html

 

 

Woah hold on 3 years isnt much on this forum, don't get all c-ock-y lol. (edited to bypass word filter lol)

 

Most of us have been scripting for over 5 years. Especially Ozzy who actually invented the internet with Al Gore!

 

And in these years of scripting we have all found that there are many many ways to write the same expression. I personally would never write something like !.msg I don't see a point to it, but hey! I love diversity!

 

 

As for the echo, I'm following the switches in the order that Khaled said.

 

/echo [-cdeghiNtsaqlbfnmr] [#channel|[=]nick] <text>

 

The issue is I misunderstood the purpose of the indent. I was always expecting it to provide space to the left, instead it indents the wrapped line. Make's sense now. I never bothered much with themes. I'm more of a 'tool creator' than a fancy pretty mirc maker. lol

 

Thanks for the participation Josh2 lol and welcome to Techgear!

Edited Nov 8, 2008 2:50 PM by Travis

I didn't mean to come of as c-ock-y, i was just saying that clean and cropped code should be readable and not just crammed together. Sorry for coming off like that :P. and i know 3 years might not be much, But i do know people who have only scripted for less then a year and know more then i do. So in technicality, 3 years is alot for mSL scripting :P.

 

 

Thank you for the heartfelt welcoming by the way :)

welcome to the forum buddy :cheers:

Haha thanks, and nice avatar. :P makes me laugh when i see it.

GTFO

 

 

... just kidding ...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No, srsly, gtfo

its a picture of x-fusion :taz: