Chatspace Memo System

By blackvenomm666 on Mar 16, 2012

Ok well i decided to make a new memo system its a lot better than my older ones and is actually pretty self explanatory. When you get a memo it will open and list all the memo's you have in your inbox. From there you can either A. double click a memo in the list to open and read it B. single click a memo then click the read button to read it C. click a memo and click reply which will auto bring up a new edit area for you to put your reply in and it will auto put the persons nick who you're replying to in the top edit box where the nick goes then after filling out your memo click send and it will send it. and D. you can click a memo in the list then click delete. Also there is a New Memo button click that to open a new memo it will have a spot for you to put the nick you want to memo then the area for you to fill out the memo. Let me know what you think

Image

raw 269 :*: { .timer 1 2 dialog -v,-md memos.system memos.system 
}  
raw 275 :*: { if (!$dialog(memos.system)) {
    dialog -v,-md memos.system memos.system 
  } 
}
raw 276 :*: { did -az memos.system 2 $2-  }
raw 277 :*: { if (!$dialog(memos.system)) {
    .timer 1 2 .dialog -v,-md memos.system memos.system
  }
  var %x = $5 | .set %memotime $asctime($ctime(%x 1/1/1), h:nn:ss TT) | did -az memos.system 1 $2-4 %memotime $6- 
}
raw 519 :*: { if ($dialog(memos.system)) {
    if ($2 == $me) {
did -r memos.system 12
      did -h memos.system 1,2,4-6,9 
      did -v memos.system 3,7-8,12-13
      did -r memos.system 13
      did -n memos.system 13
      did -a memos.system 13 enter a nick to send a memo to
      did -a memos.system 12 your nick must be registered before you can send a memo to someone

    }
    else {
      did -r memos.system 12
      did -h memos.system 1,2,4-6,9 
      did -v memos.system 3,7-8,12-13
      did -r memos.system 13
      did -n memos.system 13
      did -a memos.system 13 enter a nick to send a memo to
      did -a memos.system 12 your memo to $2 could not be sent because $2-
    }
  }
} 
Menu Menubar,Nicklist,Channel {
  .Memo System: dialog $iif($dialog(memos.System),-v,-md memos.System) memos.System 
}
Dialog memos.System {
  Title "MemoSystem"
  Size -1 -1 200 100
  Option dbu
  list 1, 02 02 140 90, hsbar vsbar
  edit "" ,2, 02 16 140 76, read multi autovs limit 370 hide
  button "Check memos ",3, 145 02 37 12 , hide
  button "Read ",4, 145 02 37 12 ,
  button "Reply ",5, 145 15 37 12 ,
  button "Delete ",6, 145 28 37 12 ,
  button "Send ",7, 145 15 37 12 , hide
  button "Cancel ",8, 145 28 37 12 , hide
  button "New Memo ",9, 145 41 37 12 ,
  edit "" ,12, 02 16 140 76, multi autovs limit 370 hide
  edit "" ,13, 02 02 140 10, hide
}
on *:Dialog:memos.system:*:*: {
  if ($devent == init) {
    refresh
  }
  if ($devent == dclick) {
    if ($did == 1) {
      did -v memos.system 2,3,13
      did -h memos.system 1,4
      did -m memos.system 13
      did -r memos.system 2,13
      did -a memos.system 13 Memo $gettok($did(1).seltext,1,32) from $gettok($did(1).seltext,2,32)
      .services memo $me read $gettok($did(1).seltext,1,46)
    }
  }
  if ($devent == sclick) {
    if ($did == 3) {
      did -r memos.system 1
      did -h memos.system 2,3,7-8,12-13
      did -v memos.system 1,4-6,9
      .services memo $me list
    }
    if ($did == 4) {
      if (!$did(1).sel) { 
        noop $input(Please select a memo in the list to read)    
      }
      else {
        did -v memos.system 2-3,13
        did -h memos.system 1,4
        did -r memos.system 2
        did -m memos.system 13
        did -r memos.system 2,13
        did -a memos.system 13 Memo $gettok($did(1).seltext,1,32) from $gettok($did(1).seltext,2,32)
        .services memo $me read $gettok($did(1).seltext,1,46)
      }
    }
    if ($did == 5) {
      if ($did(1).visible) && ($did(1).sel) { 
        did -r memos.system 12
        did -h memos.system 1,2,4-6 
        did -v memos.system 3,7-8,12-13
        did -r memos.system 13
        did -n memos.system 13
        did -a memos.system 13 $gettok($did(1).seltext,2,32)

      }
      elseif ($did(1).visible) && (!$did(1).sel) {
        noop $input(Please select a memo in the list to reply to)
      }
      else {
        .var %replynick $gettok($did(13).text,4,32)
        did -r memos.system 12
        did -h memos.system 1,2,4-6 
        did -v memos.system 3,7-8,12-13
        did -r memos.system 13
        did -n memos.system 13      
        did -a memos.system 13 %replynick
      }
    }
    if ($did == 6) {
      if (!$did(1).sel) {
        noop $input(Please select a memo in the list to delete)
      }
      elseif (!$did(1).visible) {
        .services memo $me delete $gettok($did(13).text,2,32)
        did -h memos.system 2,3,13
        did -v memos.system 1,4 
        did -r memos.system 1
        refresh
      }
      else {
        .services memo $me delete $gettok($did(1).seltext,1,46)
        did -r memos.system 1
        refresh
      }
    }
    if ($did == 7) {
      .services memo $did(13).text send $did(12).text
      did -r memos.system 1,12
      did -v memos.system 1,4-6,9 
      did -h memos.system 3,7-8,12-13
      refresh

    }
    if ($did == 8) {
      did -r memos.system 1,12
      did -v memos.system 1,4-6,9 
      did -h memos.system 3,7-8,12-13
      refresh
    }
    if ($did == 9) {
      did -r memos.system 12
      did -h memos.system 1,2,4-6,9 
      did -v memos.system 3,7-8,12-13
      did -r memos.system 13
      did -n memos.system 13
      did -a memos.system 13 enter a nick to send a memo to
    }

  }
}
alias refresh {
  .services memo $me list
}

Comments

Sign in to comment.
blackvenomm666   -  Jun 26, 2012

O_O

 Respond  
kiri   -  May 01, 2012

you should have done a single event and you sent the raw data in the same event almost 519

Suggestion :

raw *:*:{
  if !$dialog(memos.system) {
    if ($istok(275.269,$numeric,46) memod
    elseif $numeric == 277 { memod | var %x = $5 | .set %memotime $asctime($ctime(%x 1/1/1), h:nn:ss TT) | did -az memos.system 1 $2-4 %memotime $6- }
  }
  else {
    if $numeric == 519 {
      if ($2 == $me) {
        did -rav memos.system 12 your nick must be registered before you can send a memo to someone
      }
      else {
        did -rav memos.system 12 your memo to $2 could not be sent because $2-
      }
      did -h memos.system 1,2,4-6,9 
      did -v memos.system 3,7-8
      did -rnav memos.system 13 enter a nick to send a memo to
    }
    elseif ($numeric == 276) did -az memos.system 2 $2-
  }
}
alias memod dialog $iif($dialog(memos.System),-v,-md memos.System) memos.System

and everywhere in your code collects orders possible

lines : 60-64

did -v memos.system 2,3,13
      did -h memos.system 1,4
      did -m memos.system 13
      did -r memos.system 2,13
      did -a memos.system 13 Memo $gettok($did(1).seltext,1,32) from $gettok($did(1).seltext,2,32)
becomes...
      did -v $dname 3
      did -h $dname 1,4
      did -vr $dname 2
      did -rvam $dname 13 Memo $gettok($did(1).seltext,1,32) from $gettok($did(1).seltext,2,32)

and I see you doing that

did-h memos.system 2,3,7-8,12-13

but as to the function of 12,13 - not used here

can also be added to warn that this can only use if you are registered

 if r isincs $ usermode

if you make a next version you can make a counter letters still possible in the message, for example :)
good coding ;)

 Respond  
blackvenomm666   -  Apr 30, 2012

updated. will be updating again with other features soon:)

 Respond  
xdesoto   -  Apr 02, 2012

Clean dialog, but too much open space. Try to shorten it down.
p.s. I guess I do remember my password.

 Respond  
D34th   -  Mar 23, 2012

yuck memos :/

 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.