Alert script (Beta)

By slub77 on Jan 10, 2010

ReadBy beta i mean it does work but i will be editing so don't worry.

How to use [list=1] []copy/paste in to scripts []Right click anywhere on mirc go to popup>settings and choose your settings [*]You must have mirc not open aka your not looking at it [/list]

Purpose Just so if your doing something else and the sound is getting annoying, and you want to be told what someone said in stead of having to look you can.

[

EDIT Added a menu to add custom words, so you can add a word and if it is said it will tell you, also a remove word, so you can remove it as well

EDIT got rid of the menu and made a dialog :)

on 1:LOAD:set %ontext on

on *:TEXT:*:*:{
  var %x 1 | var %a $calc($ini(popup.ini,popup,0) +1)
  :loop
  if %x == %b { halt }
  if $readini(popup.ini, popup, $ini(popup.ini,popup,%x)) isin $1- { noop $tip(Channel,Custom message : Time $time ,Custom word said:@ $readini(popup.ini, popup, $ini(popup.ini,popup,%x)) :@ in $chan by $nick,1)  }
  else { inc %x | goto loop }
}

menu * {
  Pop up:/dialog -ma popup popup
}

#popup on

on *:TEXT:*:#:{
  if %ontext {
    if $me isin $1- {
      if !$appactive { noop $tip(Channel,Channel $chan : Time $time ,$me someone has said your name: $nick : $1- ,1)  } 
      else { halt }
    }
    if samuel isin $1- {
      if !$appactive { noop $tip(Channel,Channel $chan : Time $time ,$me someone has said your name: $nick : $1- ,1)  } 
      else { halt }
    }

  }

}

on *:TEXT:*:?:{
  if %onmessage {
    if !$appactive { noop $tip(Channel,Private message : Time $time ,$me someone has said your name: $nick : $1-,1)  } 
    else { halt }
  } 
}

#popup end

dialog popup {

  title The Dialog

  size -1 -1 208 118

  option dbu

  button On, 90, 9 25 100 10, 
  button Off, 91, 109 25 90 10, 
  button +, 93, 100 35 100 25, 
  button -, 94, 100 65 100 25,  disable
  edit , 95, 100 90 100 10, disable, center
  button Refresh, 10, 70 107 60 10
  list 92, 9 35 90 70, read, multi

}

on *:DIALOG:popup:INIT:*:{
  if $ini(popup.ini,popup,0) == 0 { echo No files }
  else {
    set %a $calc($ini(popup.ini,popup,0) +1) | set %b 1 | set %c 1
    :loop
    if %a == %b { noop }
    else { did -i $dname 92 %c $+($ini(popup.ini,popup,%b),=,$readini(popup.ini, popup, $ini(popup.ini,popup,%b))) | inc %b | inc %c | goto loop }
  }
}
on 1:DIALOG:popup:sclick:92:{
  if !$did(92).seltext { halt }
  else {
    did -o $dname 95 1 $readini(popup.ini, popup, $did(92).seltext)
    did -e $dname 94
  }
}
on 1:DIALOG:popup:sclick:94:{
  var %a 1 | var %b $calc($ini(popup.ini,popup,0) +1)
  :loop
  if %a == %b { did -o $dname 95 1 $ini(popup.ini,popup,%a) $left($did(92).seltext,1)} }
  else {
    if $ini(popup.ini,popup,%a) == $left($did(92).seltext,1) { remini popup.ini popup $ini(popup.ini,popup,%a) | $autoc }
    else { inc %a | goto loop }
  }
}

on 1:DIALOG:popup:sclick:93:{
  noop $?=" Enter the new word that you would like to show when said "
  if !$! { halt }
  else {
    set %x $calc($lines(popup.ini) + 1)
    set %word $!
    set %b 1

    :loop

    if %b == %x {
      writeini popup.ini popup %b %word
    did -o $dname 95 1 Added %word }
    else {
      if $readini(popup.ini, popup, %b) {
        inc %b
        goto loop 
      }
      else { 
        writeini popup.ini popup %b %word
      did -o $dname 95 1 Added %word | $autoc }

    }
  }
}
on 1:DIALOG:popup:sclick:90:{
  set %ontext on
  set %onmessage on
  did -o $dname 95 1 popup is now on 
  noop $tip(Proof, Here is the proof, You open the dialog on %channel ;))
  did -e $dname 91 | did -b $dname 90
}

on 1:DIALOG:popup:sclick:91:{
  set %ontext off
  set %onmessage off
  did -o $dname 95 1 popup is now off 
  did -e $dname 90 | did -b $dname 91

}

on 1:DIALOG:popup:Sclick:10:{
  dialog -x popup popup
  dialog -ma popup popup

}

Comments

Sign in to comment.
maisdesign   -  Jan 01, 2013

Just a little bump is there a way to be notified by an email if a a keyword is found?

More
 Respond  
maisdesign   -  May 11, 2012

Is there a way to send an email each time it founds the selected word?

More
 Respond  
incognitus   -  Feb 04, 2012

Works great, exactly what i was looking for. Thing is that im not always around (obviously) and i dont want to scroll to figure when and who said what i set. Is there any way to add a txt so i can read later who and when someone made it trigger? Thanks in advanced!

More
 Respond  
slub77   -  Jul 28, 2010

That's what i said :O

More
 Respond  
SnoooP   -  Jul 26, 2010

It should work fine ankush, but if you have any problems just ask :)

More
 Respond  
slub77   -  Jul 26, 2010

sure just ask

More
 Respond  
ankush   -  Jul 23, 2010

Hmmmm. Am trying it. Lets see if it works. Thank you !!! May need help with this

More
 Respond  
slub77   -  Mar 23, 2010

Cheers dude, yea i had the error for a while as well, but napa182 and me came up with the noop thing once when we were talking

More
 Respond  
Deni   -  Mar 22, 2010

cool, thanks for your script :) i have not realy tested it... but after reading it i understand now this $tip command :D i allways got an error because i did not use this noop :)) so because it did help me to understand the $tip command i did press the "i like it" button ;)

More
 Respond  
slub77   -  Jan 13, 2010

Thanks for the rating :)

More
 Respond  
slub77   -  Jan 11, 2010

yea :/ it's to insure that i aint gona break it lol

More
 Respond  
Jethro   -  Jan 11, 2010

I don't see the validity of "else halt." Is this a force of habit to some people?

More
 Respond  
SnoooP   -  Jan 11, 2010

Childish behaviour lol.. :D Nice Slub77 =]

More
 Respond  
slub77   -  Jan 10, 2010

lol ok then, u could have deleted but i aint gonna

More
 Respond  
gooshie   -  Jan 10, 2010

slub77 lol.. you post a link to your script in my script so here is my alert script link.

More
 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.