Advertisement
intersys

Untitled

Jun 9th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.47 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.  
  26. on *:dialog:npad:menu:15 {
  27.   did -a $dname 1 $me
  28. }
  29. on *:dialog:npad:menu:17 {
  30.   did -a $dname 1 $date
  31. }
  32. on *:dialog:npad:menu:18 {
  33.   did -a $dname 1 $time
  34. }
  35. on *:dialog:npad:menu:19 {
  36.   did -a $dname 1 $date - $time
  37. }
  38. on *:dialog:npad:edit:1 {
  39.   did -ra $dname 12 Lines : $did(1).lines
  40. }
  41. dialog sts {
  42.   title "Stats"
  43.   size -1 -1 105 37
  44.   option dbu
  45.   text "File:", 1, 5 2 12 8
  46.   edit "", 2, 35 2 67 10, read autohs
  47.   text "Lines:", 3, 5 13 14 8
  48.   edit "", 4, 77 13 25 10, disable
  49.   text "Size:", 5, 5 24 19 8
  50.   edit "", 6, 77 24 25 10, disable
  51. }
  52.  
  53.  
  54. on *:dialog:sts:init:* {
  55.   did -a $dname 2 %file
  56.   did -a $dname 4 $lines(%file)
  57.   did -a $dname 6 $mid($calc($file(%file).size / 1000),1,4) KB
  58. }
  59. on *:dialog:npad:menu:11 {
  60.  
  61.   if (!$dialog(sts)) { dialog -m sts sts }
  62.   else { dialog -v sts sts }
  63. }
  64. on *:dialog:npad:menu:9 {
  65.   if (!$dialog(abt)) { dialog -m abt abt }
  66.   else { dialog -v abt abt }
  67. }
  68. on *:dialog:npad:menu:3 {
  69.   set %file $sfile(File to open,File to open)
  70.   did -r $dname 1
  71.   if (%file) { .loadbuf 0 -o $dname 1 " $+ %file $+ "
  72.     set %filex mIRC notepad :: $nopath(" $+ %file $+ ")
  73.     dialog -t $dname %filex
  74.     did -ra $dname 13 File : %file , Size :  $mid($calc($file(%file).size / 1000),1,4) KB
  75.     did -ra $dname 12 Lines : $lines(%file)
  76.  
  77.   }
  78. }
  79. on *:dialog:npad:menu:5 {
  80.   if (!%file) { set %file $$sfile(untitled.txt,save,save) | .savebuf  -eo $dname 1 " $+ %file $+ " }
  81.   else { .savebuf  -eo $dname 1 " $+ %file $+ " }
  82. }
  83.  
  84.  
  85. on *:dialog:npad:menu:6 {
  86.   ; if ($gettok($dialog(npad).title,2,58))  {
  87.   dialog -t $dname mIRC notepad :: untitled.txt
  88.   unset %file
  89.   unset %filex
  90.   did -r $dname 1
  91. }
  92. on *:dialog:npad:close:* {
  93.   if ($dialog(sts)) { dialog -x sts sts }
  94.   if ($dialog(abt)) { dialog -x abt abt }
  95.   unset %file
  96.   unset %filex
  97. }
  98. alias notepad { if (!$dialog(npad)) { dialog -m npad npad } }
  99. menu menubar,channel {
  100.   mIRC notepad :/notepad
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement