LibraIRC.net Forums
Addon: Echo highlights to new window - Printable Version

+- LibraIRC.net Forums (https://librairc.net/forums)
+-- Forum: Public Forums (https://librairc.net/forums/forum-47.html)
+--- Forum: IRC Discussions (https://librairc.net/forums/forum-57.html)
+---- Forum: KVIrc (https://librairc.net/forums/forum-11.html)
+---- Thread: Addon: Echo highlights to new window (/thread-46.html)



Addon: Echo highlights to new window - immortal - 22-10-2011

Right, we all do like to have a new window to see who is typing our nick! or the words we added to highlights..
Quote:The highlight settings at "Configure KVIrc, IRC, Tools, Alerts/Highlight"
Sounds at  "Configure KVIrc, General Options, Sound"

So now lets make new window for our highlights.
It would be simple as using parse code as we did for popups and aliases, or as well using "Scripting, Event editor" ill go for simpler way and let you guys play with the "Scripting editors" to find out some things yourself.

Here is the file just "/parse filepath" it  ie: /parse "C:/Program Files/KVIrc/defscript/highlight.kvs"
OR
Scripting , Execute Script and double click the file you downloaded.

Code:
addon.register("Highlights","1.0","Highlights","Erkan","4.0.1"){
    event(OnHighlight,echos){}
    echo The Highlights script has been uninstalled succesfully.
}
event(OnHighlight,echos)
{
    if($window.type() == "channel") {
    %type = $chan.name
    } else {
    %type = $tr("Query");
    }
    %msg = $my.network @ $fmtlink(%type $0 : $3 ,window.activate $window,"Double Click to Show the Channel or Query")
    if ($window.exists(%Highlights)) {
    echo -w=%Highlights %msg
    } else {
    %Highlights = $window.open("mq","Highlights",0,219)
    log.start -w=$window(Highlights) -p Highlights$date("d.m.Y").log
    echo -w=%Highlights %msg
    }
}
# Highlights Windows :)
echo Highlights 1.0 installed succesfuly :P
echo You can always uninstall it by using 'Manage Addons' from the "Settings" menu.