Highlight Manager

By ^Neptune on Sep 04, 2008

Image

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.

#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

Sign in to comment.
jackster35-1   -  Jan 28, 2010

no i dint

 Respond  
Jethro   -  Jan 27, 2010

Maybe you broke it...

 Respond  
jackster35-1   -  Jan 27, 2010

umm well i aint working ATAL! why?

 Respond  
Michael-TV   -  Jul 16, 2009

Could be better but hes its nice and working 8-) thanks for that script

 Respond  
EL   -  Sep 05, 2008

Geesh i aint tested this yet hrm.`-.-´

 Respond  
napa182   -  Sep 05, 2008

sure why not

 Respond  
^Neptune   -  Sep 05, 2008

Er, anyways.. anyone think a pager idea for this would be good?

 Respond  
^Neptune   -  Sep 04, 2008

Yeah and you can get highlighted with other misc.com words like, in EL's case, "ROFLPOTS"

xP

 Respond  
napa182   -  Sep 04, 2008

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.

 Respond  
Eugenio   -  Sep 04, 2008

rofl yeah thats a point

 Respond  
^Neptune   -  Sep 04, 2008

DOF, you've only started scripting since yesterday and already concluded dialogs as rubbish when you haven't even used them?

Uhm, what?

 Respond  
DangerOfFate   -  Sep 04, 2008

It must have just been implemented then... Oh well

 Respond  
Eugenio   -  Sep 04, 2008

oh lol never knew that, well Ive been a member for more than 7 months ;o

 Respond  
DangerOfFate   -  Sep 04, 2008

Must be a member for 7 days to rate scripts.

 Respond  
Eugenio   -  Sep 04, 2008

roffles
/me rolls

 Respond  
Jonesy44   -  Sep 04, 2008

lol, eugenio, lol. Jesus..

 Respond  
Eugenio   -  Sep 04, 2008

haha who said I was trying to type properly or make a proper sentence ?
lmao jog on

 Respond  
DangerOfFate   -  Sep 04, 2008

I mean, I understand the 'lmfao' and 'stfu' but the attempt at a sentence...

 Respond  
Eugenio   -  Sep 04, 2008

well its better than singing in sheep
;x

cant rate yet ?!?

 Respond  
Jonesy44   -  Sep 04, 2008

Essex - Plain English

 Respond  
Eugenio   -  Sep 04, 2008

lmfao @ danger of fate
google translator for you
^_^

 Respond  
DangerOfFate   -  Sep 04, 2008

LOL, apart from my opinion, nice snippet...Since I can't rate yet I'll +like

 Respond  
^Neptune   -  Sep 04, 2008

Actually, can anyone think of a more friendly way of viewing words in a dialog list?

I can't

 Respond  
DangerOfFate   -  Sep 04, 2008

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.

 Respond  
^Neptune   -  Sep 04, 2008

can't be assed
to be honest

 Respond  
DangerOfFate   -  Sep 04, 2008

I never assumed why you script, I just pointed out that this could be done in an easier fashion.

 Respond  
Eugenio   -  Sep 04, 2008

rofl stfu
make me look like an angel, least I state fact
-.-

 Respond  
DangerOfFate   -  Sep 04, 2008

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.

 Respond  
^Neptune   -  Sep 04, 2008

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

 Respond  
Jonesy44   -  Sep 04, 2008

Nothing immature about it. cba to argue tbh. I like dialogs. agree to disagree on that one eh.

 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.