Notepad

By Renegade on May 24, 2009

Yet another one of these things, I didn't actually create this one, just did a bit of editting it belongs to Akishoot, not sure if he put it up, but a few people have asked for something a little similar.

I made it little shorter, ever noticed how people love to make everything more difficult for themselves? Anyways it's rather simple.

menu menubar,channel,status {
  -
  mIRC Notepad:{
    if (!$dialog(Notes)) { .dialog -mod notes notes notes }
  }
}
dialog Notes {
  title "mIRC Notepad"
  size -1 -1 569 505
  option pixels
  edit "", 1, -3 0 573 476, autovs multi return vsbar
  button "Exit", 2, 493 479 65 22, ok
  check "Save When Closed", 3, 5 482 112 17
}
on *:dialog:notes:init:0:{
  .loadbuf -o notes 1 mIRC-Notes.mtxt
  if ($group(#SaveOnClose) == on) { .did -c notes 3 }
}
on *:dialog:notes:sclick:3:{
  if ($group(#SaveOnClose) == on) {
    .disable #SaveOnClose
  }
  elseif ($group(#SaveOnClose) == off) {
    .enable #SaveOnClose
  }
}
#SaveOnClose off
on *:dialog:notes:close:0:{
  .savebuf -o notes 1 mIRC-Notes.mtxt
  .echo -a 3* Your data has been saved.
}
#SaveOnClose end

Comments

Sign in to comment.
Renegade   -  May 25, 2009

Oh, I see.

Thanks.

 Respond  
Jonesy44   -  May 24, 2009

shortenned again..

menu menubar,channel,status {
  -
  mIRC Notepad:dialog $iif($dialog(notes),-v,-mod) notes notes notes
}
dialog Notes {
  title "mIRC Notepad"
  size -1 -1 569 505
  option pixels
  edit "", 1, -3 0 573 476, autovs multi return vsbar
  button "Exit", 2, 493 479 65 22, ok
  check "Save When Closed", 3, 5 482 112 17
}
on *:dialog:notes:init:*:{
  .loadbuf -o notes 1 mIRC-Notes.mtxt
  if ($group(#SaveOnClose) == on) did -c notes 3
}
on *:dialog:notes:sclick:3: $+(.,$iif($group(#SaveOnClose) == on,disable,enable)) #SaveOnClose
#SaveOnClose off
on *:dialog:notes:close:*:{
  .savebuf -o notes 1 mIRC-Notes.mtxt
  .echo -a 3* Your data has been saved.
}
#SaveOnClose end
 Respond  
WorldDMT   -  May 24, 2009

hi

dialog -mod name table

=> dialog -mod notes notes

u can do this if u want

menu menubar,channel,status {
  -
  mIRC Notepad:dialog $iif($dialog(notes),-v,-md notes) notes
}

u dont need to "autovs" u need "autohs" & "hsbar"

u dont control if u have a file to load it or not !!!

u can use a global variable for check control & a $input identifer for save then u dont need a check put only a button to load a file or save or save as... or put a dialog menu

u can also use $devent

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.