Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog npad {
- title "mIRC notepad"
- size -1 -1 254 257
- option dbu
- edit "", 1, 0 -1 254 248, multi return autohs autovs hsbar vsbar
- edit "", 12, 0 246 48 11, disable
- edit "", 13, 48 246 206 11, disable
- menu "File", 2
- item "New", 6, 2
- item break, 7, 2
- item "Open", 3, 2
- item break, 4, 2
- item "Save", 5, 2
- menu "Insert", 14
- item "your nick", 15, 14
- item break, 16, 14
- item "todays date", 17, 14
- item "todays time", 18, 14
- item "todays date/time", 19, 14
- item break, 20, 14
- menu "options", 10
- item "stats", 11, 10
- }
- on *:dialog:npad:menu:15 {
- did -a $dname 1 $me
- }
- on *:dialog:npad:menu:17 {
- did -a $dname 1 $date
- }
- on *:dialog:npad:menu:18 {
- did -a $dname 1 $time
- }
- on *:dialog:npad:menu:19 {
- did -a $dname 1 $date - $time
- }
- on *:dialog:npad:edit:1 {
- did -ra $dname 12 Lines : $did(1).lines
- }
- dialog sts {
- title "Stats"
- size -1 -1 105 37
- option dbu
- text "File:", 1, 5 2 12 8
- edit "", 2, 35 2 67 10, read autohs
- text "Lines:", 3, 5 13 14 8
- edit "", 4, 77 13 25 10, disable
- text "Size:", 5, 5 24 19 8
- edit "", 6, 77 24 25 10, disable
- }
- on *:dialog:sts:init:* {
- did -a $dname 2 %file
- did -a $dname 4 $lines(%file)
- did -a $dname 6 $mid($calc($file(%file).size / 1000),1,4) KB
- }
- on *:dialog:npad:menu:11 {
- if (!$dialog(sts)) { dialog -m sts sts }
- else { dialog -v sts sts }
- }
- on *:dialog:npad:menu:9 {
- if (!$dialog(abt)) { dialog -m abt abt }
- else { dialog -v abt abt }
- }
- on *:dialog:npad:menu:3 {
- set %file $sfile(File to open,File to open)
- did -r $dname 1
- if (%file) { .loadbuf 0 -o $dname 1 " $+ %file $+ "
- set %filex mIRC notepad :: $nopath(" $+ %file $+ ")
- dialog -t $dname %filex
- did -ra $dname 13 File : %file , Size : $mid($calc($file(%file).size / 1000),1,4) KB
- did -ra $dname 12 Lines : $lines(%file)
- }
- }
- on *:dialog:npad:menu:5 {
- if (!%file) { set %file $$sfile(untitled.txt,save,save) | .savebuf -eo $dname 1 " $+ %file $+ " }
- else { .savebuf -eo $dname 1 " $+ %file $+ " }
- }
- on *:dialog:npad:menu:6 {
- ; if ($gettok($dialog(npad).title,2,58)) {
- dialog -t $dname mIRC notepad :: untitled.txt
- unset %file
- unset %filex
- did -r $dname 1
- }
- on *:dialog:npad:close:* {
- if ($dialog(sts)) { dialog -x sts sts }
- if ($dialog(abt)) { dialog -x abt abt }
- unset %file
- unset %filex
- }
- alias notepad { if (!$dialog(npad)) { dialog -m npad npad } }
- menu menubar,channel {
- mIRC notepad :/notepad
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement