before you accuse me of stealing, it says "BY IVANALICIUS" in the script... sooo.. duh
What i did, was add a few word changing things and added a status bar, like in the real notepad
/*
Origionally created by Ivanalicious from www.Hawkee.com
i decided to choose my favorite notepad script and edit
it to my likings, this is what ive gotten so far =D =D
*/
#notepad on
on *:LOAD:{
echo -a NotePad By Ivanalicius Loaded :>) Visit www.hawkee.com
}
menu Menubar {
Notepad:/notepad
}
dialog Notepad {
title "Ivanalicius_Hawkee.txt - Ivana NotePad [/notepad]"
size -1 -1 260 186
option dbu
edit "", 1, 0 0 260 176, multi return autohs autovs hsbar vsbar
text "Length: 0 Lines: 0 Words: 0", 5, 2 177 206 10
text $($time(dddd d/m/yyyy hh:nn:ss TT)), 6, 175 177 206 10
menu "File", 910
item "New", 911, 910
item "Open...", 912, 910
item break, 913, 910
item "Save", 914, 910
item "Save as...", 915, 910
item break, 916, 910
item "Print", 917, 910
item break, 918, 910
item "Close", 919, 910, ok
menu "Tools", 920
item "Copy", 922, 920
item "Paste", 923, 920
item "Clear", 924, 920
item break, 925, 920
######
menu "Word changing", 2
item "Encode", 19, 2
item "Decode", 20, 2, checked
item break, 21, 2
item "Text to CHR", 22, 2
item "CHR to Text", 23, 2
item break, 24, 2
item "All Upper", 25, 2
item "All Lower", 26, 2
menu "Insert", 55
item "Date and Time", 926, 55
item "Random Number", 56, 55
item "Random Letter", 57, 55
}
alias len-_ {
var %i = 1, %v = 0
while ($did(notepad,1,%i)) {
%v = $calc(%v + $len($v1))
inc %i
}
return %v
}
alias wrd-_ {
var %i = 1, %v = 0
while ($did(notepad,1,%i)) {
%v = $calc(%v + $gettok($v1,0,32))
inc %i
}
return %v
}
alias tme-_ $iif($dialog(notepad),did -ra notepad 6 $time(dddd d/m/yyyy hh:nn:ss TT),timertm-_ off)
alias Notepad { $iif(!$dialog(notepad),dialog -md notepad notepad,dialog -v notepad notepad) }
on *:dialog:Notepad:init:*:{ set %mnp.file newfile | .timertm-_ 0 1 tme-_ }
on *:dialog:Notepad:edit:1:{ did -ra notepad 5 Length: $len-_ $+ $str($chr(32) $+ $chr(160),3) $+ Lines: $did(notepad,1).lines $+ $str($chr(32) $+ $chr(160),3) $+ Words: $wrd-_ }
on *:dialog:Notepad:menu:*:{
if ($did == 911) { did -r Notepad 1 | dialog -t $dname Ivanalicius_Hawkee.txt - mIRC NotePad | set %mnp.file newfile }
if ($did == 912) { var %a = $sfile($mircdir,Open,Open) | loadbuf -ro Notepad 1 %a | dialog -t $dname $nopath(%a) - mIRC NotePad | set %mnp.file %a }
if ($did == 914) {
if (%mnp.file == newfile) { goto a }
else { goto b }
:a
var %a = $sdir($mircdir,Select the directory where the file should be saved)
if (%a == $null) { return }
var %b = $?="New name of the file. E.x. lame.txt"
if (%b == $null) { return }
dialog -v $dname
dialog -t $dname %b - Ivanalicius NotePad
goto b
:b
mnp.save %mnp.file
}
if ($did == 915) {
var %a = $sdir($mircdir,Select the directory where the file should be saved)
if (%a == $null) { return }
var %b = $?="New name of the file. E.x. lame.txt"
if (%b == $null) { return }
mnp.save %a $+ %b
dialog -t $dname %b - mIRC NotePad
dialog -v $dname
set %mnp.file %a $+ %b
}
if ($did == 56) { did -a Notepad 1 $rand(1,9) }
if ($did == 57) { did -a Notepad 1 $rand(A,Z) }
if ($did == 917) { mnp.print }
if ($did == 919) { dialog -x Notepad }
if ($did == 922) { clipboard $did(1).seltext }
if ($did == 923) { mnp.paste }
if ($did == 924) { did -r Notepad 1 }
if ($did == 926) { did -a Notepad 1 $time(hh:nn) $date }
if ($did == 931) { mnp.about }
if ($did isnum 19-20) { $iif($did == 19,enc-_,dec-_) }
if ($did isnum 22-23) { $iif($did == 22,ttc-_,ctt-_) }
if ($did isnum 25-26) { $iif($did == 25,u\l-_,l\u-_) }
}
alias enc-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $encode($v1)
inc %i
}
}
alias dec-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $decode($v1)
inc %i
}
}
alias ttc-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $chrwrite($v1)
inc %i
}
}
alias chrwrite $iif($isid,return,echo) $iif($len($1-) > 1,$!+ $+ $chr(40)) $+ $replace($mid($regsubex($1-,/(.)/g,$+($!chr,$chr(40),$asc(\t),$chr(41),$chr(44))),1,-1),$+($chr(44),$!chr(32),$chr(44)),$+($chr(41) $!+,$chr(40))) $+ $iif($len($1-) > 1,$chr(41))
alias ctt-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $($v1,2)
inc %i
}
}
alias u\l-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $upper($v1)
inc %i
}
}
alias l\u-_ {
var %i = 1
while ($did(notepad,1,%i)) {
did -o notepad 1 %i $lower($v1)
inc %i
}
}
alias mnp.paste {
var %a = 1
while (%a <= $cb(0)) {
did -a $dname 1 $cb(%a) $crlf
inc %a
}
}
alias mnp.save { savebuf -o Notepad 1 " $+ $1 $+ " }
alias mnp.print {
var %b = " $+ $scriptdirTEMP.txt $+ "
write -c %b
savebuf -o Notepad 1 " $+ $scriptdirTEMP.txt $+ "
run -n notepad /p %b
.timer 1 1 .remove %b
}
#notepad end