Top

Highlight Manager


mIRC Code
+ 2 likes
Please Register to submit score.
Bookmark and Share
Average Score  9.0 (of 1 scores)
Date Added  Sep 04, 2008
Last Updated  Sep 04, 2008
Tags  dialog  highlight  hilight  manager  mirc  regex  script 

Introduction



Hehe, I learned regex recently so I decided to try it out with something like this. The regex string isn't all mine, however, cause I had some help from the people at Quakenet (thankies!). Typo also helped me with a couple of things, so kudos to him too.

This highlight manager allows you to easily set options as to what you want to do when highlighted, and easily allows you to manage which words are activated.

Load into remotes and type /highlights

Any suggestions/errors (shouldn't be any) would be greatly appreciated.

Grab the Code

#highlight on
on $*:TEXT:$(/\Q $replacexcs(%high.words,$chr(32),\E|\Q,\E,\E\\E\Q) \E/Six):#: {
  if (%t.ip) { noop $tip(Highlight,Highlight,You have been highlighted! $crlf $+ Server: $server $crlf $+ Channel: $chan,5,,,,) }
  if (%h.msg) { .msg $nick %h.msg }
}
#highlight end
dialog highlight {
  title "Highlight Options"
  size -1 -1 119 154
  option dbu
  check "Enable highlights", 1, 5 11 55 9
  check "Make a tip when highlighted", 2, 15 21 85 8
  check "Message the nick when highlighted:", 3, 15 32 97 8
  edit "", 4, 14 44 100 10, autohs
  box "Options", 5, 2 0 115 57
  list 6, 6 69 107 70, hsbar vsbar size
  button "Add", 7, 47 140 32 12
  button "Remove", 8, 82 140 32 12
  box "Words to activate on", 9, 2 59 115 94
}
on *:dialog:highlight:edit:4: { set %h.msg $did(4).text }
on *:dialog:highlight:init:0: {
  if (!%high) { did -b $dname 2-9 }
  if (%high) { did -c $dname 1 }
  if (%t.ip) { did -c $dname 2 }
  if (%h.msg) { did -c $dname 3 | did -a $dname 4 %h.msg }
  tokenize 32 %high.words
  var %a = 1
  while (%a <= $numtok(%high.words,32)) {
    did -a $dname 6 $gettok(%high.words,%a,32)
    inc %a
  }
}
on *:dialog:highlight:sclick:*: {
  if ($did == 1) {
    if ($did(1).state == 0) { unset %high | did -b $dname 2-9 | disable #highlight }
    if ($did(1).state == 1) { 
      if (%h.msg) { did -e $dname 2-9 }
      else { did -e $dname 2,3,5-9 }
      set %high on
      enable #highlight
    }
  }
  if ($did == 2) {
    if ($did(2).state == 0) { unset %t.ip }
    if ($did(2).state == 1) { set %t.ip on }
  }
  if ($did == 3) {
    if ($did(3).state == 0) { unset %h.msg | did -b $dname 4 }
    if ($did(3).state == 1) { set %h.msg $did(4).text | did -e $dname 4 }
  }
  if ($did == 7) {
    did -a $dname 6 $?="What word would you like to be highlighted on?"
    var %a = 1
    while (%a <= $did(6).lines) {
      set %high.words $addtok(%high.words,$did($dname,6,%a).text,32)
      inc %a
    }
  }
  if ($did == 8) {
    if (!$did(6).sel) { noop $input(You did not select anything to remove.,uwo,Error!) }
    else {
      unset %high.words
      did -d $dname 6 $did(6).sel
      var %a = 1
      while (%a <= $did(6).lines) {
        set %high.words $addtok(%high.words,$did($dname,6,%a).text,32)
        inc %a
      }
    }
  }
}
alias highlights { dialog $iif($dialog(highlight),-v,-m) highlight highlight }
 

Comments

  (43)  RSS
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:19 am
Any comments would be appreciated. :)
F*U*R*B*Y*
Comments: 637
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:27 am
i think it would be nice to have a list of uh functions, for want of a better word, to use instead of $tip, example, add another list box, with like, echo/msg/act/amsg/ame/tip so the user can pick, rather then just have $tip...

Besides that, nice work :)
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 8:49 am
I was thinking of doing a pager option for number of highlights.. that sound good?
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:11 am
what is $crlf?

I see it used in sockets more than anything..

IFHTT
Comments: 13
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:16 am
Carriage Return/Line Feed
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:19 am
LoL.. oh.. what does that do? XD
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:29 am
Basically puts a new line in like $tip, $input or $? or stuff
IFHTT
Comments: 13
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:31 am
Yeah, pretty much. Carriage Return marks the end of a line, and Line Feed starts the new line, so any data after $crlf will be on a new line
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 11:59 am
ahh nice one!

I might use that sometime!
:D
Viper01
Comments: 94
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 3:02 pm
i need to learn regex and groups D:
napa182
Comments: 1,455
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 4:21 pm
thats one huge list box for the nicks to highlite

on ur init event instead of

Code:
var %a = 1
  while (%a <= $numtok(%high.words,32)) {
    did -a $dname 6 $gettok(%high.words,%a,32)
    inc %a


you can do the same thing useing didtok.

Code:
didtok $dname 6 32 %high.words

DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:32 pm
Why use a dialog to highlight? I would make it so much simpler, so you wouldn't have to go through the trouble of getting the coordinates for the different checks and such or use a dialog creator. Since this script looks complicated to someone who is new to mirc scripting (me) I would say to use something to stop highlighting in the active channel.

Code:
 on *:text:*{
 if ($me isin $1-) && ($chan != -a) {
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:39 pm
Why post a crappy script when you can have a more complex, user friendly (dialog), script that covers every aspect you need?
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:44 pm
For people who wouldn't understand dialog. For people who are learning. For the scripter her/himself so they don't have to go through calculations and find the coordinates of the radios and checks and others such things. And it is very possible to cover every aspect one may need without a dialog. Though I do agree, dialogs are user friendly, but scripters and people who are learning, dialogs may be to complicated. And what I said wouldn't be crappy, it would be easier, more suit for beginners and people who have troubles getting a hold of things such as napa182s crap or dialog.


Quote:
It is not that I am too smart, it is that I think about a problem for too long. - Albert Einstein
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:46 pm
Point is, this is a snippets section, not a learning ground. Lead by example. start simple.. then head out. not start at hawkee. Forums are always there to help start though.
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:50 pm
True, but many people use hawkee or other snippet sites to learn. I find it easy to learn by example, looking at other peoples scripts. I learned a lot over the past day or so I have been here. I started scripting a day before I joined hawkee. Anyways I just stick to hating dialogs until further notice.. No point in arguing over such an immature subject.
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:51 pm
Nothing immature about it. cba to argue tbh. I like dialogs. agree to disagree on that one eh.
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:54 pm
I'm scripting for a user to be able to do things simply, not as an example of how to do a dialog

And thanks napa, I'll edit it with didtok to cut lines
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:54 pm
LOL. I mean an argument over liking/disliking dialogs and what Hawkee is meant for is immature. And may I ask what 'cba' and 'tbh' are? And sure, let's agree to disagree as you said.
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:55 pm
rofl stfu
make me look like an angel, least I state fact
-.-
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:56 pm
I never assumed why you script, I just pointed out that this could be done in an easier fashion.
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:56 pm
can't be assed
to be honest
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:58 pm
Eugenio, what does your previous post mean in a better laid out English-Grammatically correct sentence? I do not understand...Oh well, off to script more/live.
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 5:59 pm
Actually, can anyone think of a more friendly way of viewing words in a dialog list?

I can't
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:01 pm
LOL, apart from my opinion, nice snippet...Since I can't rate yet I'll +like
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:01 pm
lmfao @ danger of fate
google translator for you
^_^
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:03 pm
Essex - Plain English
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:04 pm
well its better than singing in sheep
;x

cant rate yet ?!?
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:05 pm
I mean, I understand the 'lmfao' and 'stfu' but the attempt at a sentence...
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:06 pm
haha who said I was trying to type properly or make a proper sentence ?
lmao jog on
jonesy44
Comments: 1,856
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:06 pm
lol, eugenio, lol. Jesus..
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:07 pm
roffles
/me rolls
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:07 pm
Must be a member for 7 days to rate scripts.
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:08 pm
oh lol never knew that, well Ive been a member for more than 7 months ;o
DangerOfFate
Comments: 44
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:10 pm
It must have just been implemented then... Oh well
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:12 pm
DOF, you've only started scripting since yesterday and already concluded dialogs as rubbish when you haven't even used them?

Uhm, what?
Eugenio
Comments: 1,193
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:13 pm
rofl yeah thats a point
napa182
Comments: 1,455
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:44 pm
for 1 DangerOfFate his dialog is fully setabul to highlite with any word you enter and is ez to set up without having to open scripts editor to change for diff nicks cuz not all people call you by ur full nick in channels.
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 4, 2008 6:48 pm
Yeah and you can get highlighted with other misc.com words like, in EL's case, "ROFLPOTS"

xP
^Neptune
Comments: 599
 
mIRC Snippet:  Highlight Manager
Posted on Sep 5, 2008 1:59 am
Er, anyways.. anyone think a pager idea for this would be good?
napa182
Comments: 1,455
 
mIRC Snippet:  Highlight Manager
Posted on Sep 5, 2008 2:30 am
sure why not
EL
Comments: 1,125
 
mIRC Snippet:  Highlight Manager
Posted on Sep 5, 2008 3:03 pm
Geesh i aint tested this yet hrm.`-.-ยด
Michael-TV
Comments: 6
 
mIRC Snippet:  Highlight Manager
Posted on Jul 16, 2009 6:30 am
Could be better but hes its nice and working 8-) thanks for that script

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom