Advertisement
intersys

By intersys

Jun 9th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.35 KB | None | 0 0
  1. dialog npad {
  2.   title "mIRC notepad"
  3.   size -1 -1 254 257
  4.   option dbu
  5.   edit "", 1, 0 -1 254 248, multi return autohs autovs hsbar vsbar
  6.   edit "", 12, 0 246 48 11, disable
  7.   edit "", 13, 48 246 206 11, disable
  8.   menu "File", 2
  9.   item "New", 6, 2
  10.   item break, 7, 2
  11.   item "Open", 3, 2
  12.   item break, 4, 2
  13.   item "Save", 5, 2
  14.   menu "Insert", 14
  15.   item "your nick", 15, 14
  16.   item break, 16, 14
  17.   item "todays date", 17, 14
  18.   item "todays time", 18, 14
  19.   item "todays date/time", 19, 14
  20.   item break, 20, 14
  21.   menu "options", 10
  22.   item "stats", 11, 10
  23. }
  24.  
  25. on *:dialog:npad:menu:*: {
  26.   if ($did == 3) {
  27.     set %file $sfile(File to open,File to open)
  28.     did -r $dname 1
  29.     if (%file) {
  30.       .loadbuf 0 -o $dname 1 " $+ %file $+ "
  31.       set %filex mIRC notepad :: $nopath(" $+ %file $+ ")
  32.       dialog -t $dname %filex
  33.       did -ra $dname 13 File : %file , Size :  $mid($calc($file(%file).size / 1000),1,4) KB
  34.       did -ra $dname 12 Lines : $lines(%file)
  35.     }
  36.   }
  37.   elseif ($did == 5) {
  38.     if (!%file) { set %file $$sfile(untitled.txt,save,save) | .savebuf  -eo $dname 1 " $+ %file $+ " }
  39.     else { .savebuf  -eo $dname 1 " $+ %file $+ " }
  40.   }
  41.   elseif ($did == 6) {
  42.     dialog -t $dname mIRC notepad :: untitled.txt
  43.     unset %file
  44.     unset %filex
  45.     did -r $dname 1
  46.   }
  47.   elseif ($did == 11) {
  48.     if (!$dialog(sts)) { dialog -m sts sts }
  49.     else { dialog -v sts sts }
  50.   }
  51.   elseif ($did == 15) { did -a $dname 1 $me }
  52.   elseif ($did == 17) { did -a $dname 1 $date }
  53.   elseif ($did == 18) { did -a $dname 1 $time }
  54.   elseif ($did == 19) { did -a $dname 1 $date - $time }
  55. }
  56.  
  57. on *:dialog:npad:edit:1 {
  58.   did -ra $dname 12 Lines : $did(1).lines
  59. }
  60.  
  61. dialog sts {
  62.   title "Stats"
  63.   size -1 -1 105 37
  64.   option dbu
  65.   text "File:", 1, 5 2 12 8
  66.   edit "", 2, 35 2 67 10, read autohs
  67.   text "Lines:", 3, 5 13 14 8
  68.   edit "", 4, 77 13 25 10, disable
  69.   text "Size:", 5, 5 24 19 8
  70.   edit "", 6, 77 24 25 10, disable
  71. }
  72.  
  73. on *:dialog:sts:init:* {
  74.   did -a $dname 2 %file
  75.   did -a $dname 4 $lines(%file)
  76.   did -a $dname 6 $mid($calc($file(%file).size / 1000),1,4) KB
  77. }
  78.  
  79. on *:dialog:npad:close:* {
  80.   if ($dialog(sts)) { dialog -x sts sts }
  81.   if ($dialog(abt)) { dialog -x abt abt }
  82.   unset %file
  83.   unset %filex
  84. }
  85. alias notepad { if (!$dialog(npad)) { dialog -m npad npad } }
  86. menu menubar,channel {
  87.   mIRC notepad :/notepad
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement