Name of chan in the background

By Ahmed Zaggoudi on Aug 24, 2011

Screenshots

When I search into our friend Google I found a snippet :
When you join a channel the snippet will make a background with name of that chan automaticly,
You should first creat a folder with name "image" from the folder mIRC then put this snippet into your mIRC (Alt+R)
I'm not the owner of this snippet
This is the source : http://www.ircfr.com/codes/NOM-PV-SALON-BACKGROUND_14485.aspx

alias backnick {
  /.window -ph @ $+ $1 0 0 $calc($width($1,arial,50) +20 )  $calc($height($1,arial,50) +50 )
  /.drawtext -r @ $+ $1 $rgb(179,217,255) arial 50 5 5 $1
  /.drawsave @ $+ $1 images\ $+ $replace($1,$chr(124),$chr(44)) $+ .bmp
  /.window -C @ $+ $1
  /.background -c $1 images\ $+ $replace($1,$chr(124),$chr(44)) $+ .bmp
  /.remove images\ $+ $replace($1,$chr(124),$chr(44)) $+ .bmp
}
on *:join:#:{
  if ( $nick == $me ) {
    backnick $chan
  }
}
on *:open:?:*:{
  backnick $nick
}

on *:nick:{
  if ( $window($newnick) != $null ) {
    backnick $newnick
  }
}
alias bquery {
  query $1
  backnick $1
}

Comments

Sign in to comment.
eL^Topo   -  Aug 27, 2011

Very nice. Thank you AmytiX.
I wonder if there is a way to merge channelname.bmp with my default background bitmap each time?

 Respond  
HaLF_EviL   -  Aug 26, 2011

oh yea , Thanks Skywalker , and Amytix ... :-) BTW Amytix Sounds Good @ Sniipet ..

 Respond  
Skywalker   -  Aug 26, 2011

how the script is now its saves into mirc ini thats why i posted that addon

 Respond  
Ahmed Zaggoudi   -  Aug 26, 2011

@ Scakk : Ah yes I will make another snippet like this, and also I will add the way to remove backgrounds when parted chan

@ SReject : nice, you'r right a snippet should be FULL, I will make another !

@ Skywalker : not need to save options into mirc.ini we can use the command /set

@ HaLF_EviL : Yes @ Skywalker has reason you suould first make a folder with this name 'image' in this address C:\Documents and Settings\786\Application Data\mIRC\

 Respond  
Skywalker   -  Aug 26, 2011

i think you forgot to create the folder images in your mirc root

 Respond  
HaLF_EviL   -  Aug 26, 2011

That Script does Not Work on my irc and the error is

  • /drawsave: error saving 'C:\Documents and Settings\786\Application Data\mIRC\images#apniisp.bmp' (line 4, script12.ini)
 Respond  
Jethro   -  Aug 26, 2011
ON me:*:PART:#: remini mirc.ini background $chan

You can use the "me" prefixed to the part event to indicate that the client that runs the code has parted to delete an entry in mirc.ini...since there is no false but ture condition.

 Respond  
Skywalker   -  Aug 26, 2011

also this script ads the backgrounds to mirc.ini
i have added:


on *:close:?: {
remini mirc.ini background $nick
}

ON *:PART:#:{
  if ($nick == $me) {
    remini mirc.ini background $chan
}

otherwise all the backgrounds stays stored in mirc.ini, making the file huge over time

 Respond  
SReject   -  Aug 25, 2011

I like the initial Idea, but I have a few suggestions:

1: As Scakk suggested, a way to remove the background
2: A way to specify the font to use and size
3: A way to specify the color used
4: A way to specify whether the picture be centered or photoed(or titled, etc)

A few things to improve your current code:

;Saves you the trouble of having the if statement
on Me:*:JOIN:#: backnick #

;If there's no pipes/if/while/etc statements, I like everything on one line.
on *:OPEN:?:*: backnick $nick

;Just, imo, cleaning up the code:
on *:NICK: if ($window($newnick)) backnick $newnick

;Instead of /bquery, I just replace mIRC's built in /query
alias query !query $1- | backnick $$1

I give it a 7/10 but get some more user options and I'll up it.

 Respond  
Scakk   -  Aug 25, 2011

Interesting.

Few notes on it.
1) May want to add a way to remove the background name.
2) The query part only works if you are PMed. Might want to add an on input to make it work if you initiate the query.
-- Could fix #2 if you alter the alias bquery to be just query then it will place the person's nick in the query window

 Respond  
Jordyk19   -  Aug 24, 2011

I like this :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.