mIRC Home    About    Download    Register    News    Help

Print Thread
#79281 14/04/04 09:51 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
This is my code the stuff in red is what I need help with thanks.

Code:
 menu menubar {
  .memo mailer:/memomailer
  -
}
dialog memomailer {
  title "Memo Mailer - By DeathfireD"
  size -1 -1 137 148
  option dbu
  edit "", 1, 1 2 135 10
  list 2, 1 15 135 111, size vsbar
  button "Write", 3, 1 127 37 9, flat
  button "Del", 4, 1 138 37 9, flat
  button "Info", 5, 104 127 30 7, flat
  button "Look for new mail", 6, 84 136 50 7, flat
}
alias memomailer { dialog -md memomailer memomailer }

on *:dialog:memomailer:sclick:*:{
  if $did == 3 { /writememo }
  if $did == 4 { /memoserv del %num }
  if $did == 5 { /infomemo }
   [color:red]  if $did == 6 { /memoserv list | put something here to show memos on the list } [/color]
}
on *:dialog:memomailer:edit:*:{
   [color:red] if $did == 1 { put something here to display whoits from } [/color] 
}
on *:dialog:memomailer:init:0:{ did -a memomailer 1 } 

dialog writememo {
title "Write New Memo"
size -1 -1 117 123
option dbu
edit "", 1, 2 7 110 10
box "Nick", 2, 0 0 114 22
box "Group Box", 3, 0 24 115 91
edit "", 4, 2 31 111 81, multi autovs
button "Send", 5, 0 116 25 7, flat
}
alias writememo { dialog -md writememo writememo }

on *:dialog:writememo:sclick:*:{
if $did == 5 { /memoserv send %nickmemo %messagememo }
}
on *:dialog:writememo:edit:*:{
if $did == 1 { set %nickmemo $did(1) }
if $did == 4 { set %messagememo $did(4) }
}
  


I added little comments in the red to help you understand what i mean.

Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
try useing tokens ;/

Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
mmm I dont really Dont know how to use tokens. But I did fix the dialog to help people understand what Im trying to do.
The things in red still need to be fixed. ( im trying to have it so when you click the Look for new mail button it will list all the new memos in the dialog list box and also show the nick of the sender in the dialog edit box, So when you click on the nick it will show the message they sent to you. Then if you hit del when your still viewing it, it will delete that message.

Code:
 menu menubar {
  .memo mailer:/memomailer
  -
}
dialog memomailer {
  title "Memo Mailer - By DeathfireD"
  size -1 -1 159 148
  option dbu
  edit "", 1, 0 1 52 125, multi autohs autovs
  list 2, 53 1 105 125, size vsbar
  button "Write", 3, 1 127 37 9, flat
  button "Del", 4, 1 138 37 9, flat
  button "Info", 5, 126 127 30 7, flat
  button "Look for new mail", 6, 106 140 50 7, flat
}
alias memomailer { dialog -md memomailer memomailer }

on *:dialog:memomailer:sclick:*:{
  if $did == 3 { /writememo }
  [color:red]  if $did == 4 { /memoserv del %num }  [/color]
  if $did == 5 { /infomemo }
   [color:red]  if $did == 6 { /memoserv list | put something here to show up in the list } [/color]
}
 [color:red]  on *:dialog:memomailer:edit:*:{
  if $did == 1 {  } [/color]
}
on *:dialog:memomailer:init:0:{ did -a memomailer 1 } 

dialog writememo {
  title "Write New Memo"
  size -1 -1 117 123
  option dbu
  edit "", 1, 2 7 110 10
  box "Nick", 2, 0 0 114 22
  box "Group Box", 3, 0 24 115 91
  edit "", 4, 2 31 111 81, multi autovs
  button "Send", 5, 0 116 25 7, flat
}
alias writememo { dialog -md writememo writememo }

on *:dialog:writememo:sclick:*:{
  if $did == 5 { /memoserv send %nickmemo %messagememo }
}
on *:dialog:writememo:edit:*:{
  if $did == 1 { set %nickmemo $did(1) }
  if $did == 4 { set %messagememo $did(4) }
}
 

Joined: Mar 2003
Posts: 611
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 611
Code:
 

  if $did == 6 { /memoserv list | put something here to show up in the list } 

you need to wait for memoserv to reply then read the reply to the listbox something like
Code:
 
on ^*:notice:*:*:{
  if ( $nick == MemoServ ) {
    if ( *memoserv*reply*to*list*command* iswm $1- ) {
      did -r memomailer 2
      did -a memomailer 2 $1-
    }
  }
}
 

Hope that helps


billythekid
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
thanks that helped a little now I got to figure how to get the message to show up and not the "you got a new memo from $nick" lol.

Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
so far this is allI have.

Code:
 menu menubar {
  .memo mailer:/memomailer
  -
}
dialog memomailer {
  title "Memo Mailer - By DeathfireD"
  size -1 -1 159 148
  option dbu
  list 1, 0 1 52 125, multi autohs autovs
  list 2, 53 1 105 125, size vsbar
  button "Write", 3, 1 127 37 9, flat
  button "Del", 4, 1 138 37 9, flat
  button "Info", 5, 126 127 30 7, flat
  button "Look for new mail", 6, 106 140 50 7, flat
}
alias memomailer { dialog -md memomailer memomailer }

on *:dialog:memomailer:sclick:*:{
  if $did == 3 { /writememo }
  if $did == 4 { /memoserv del $$?="what message do you want to delete?" | did -r memomailer 2 | did -r memomailer 1 | memoserv list }
  if $did == 5 { /infomemo }
  if $did == 6 { /memoserv list }
}
on *:dialog:memomailer:edit:*:{
  if $did == 1 {  }
}
on *:dialog:memomailer:init:0:{ did -a memomailer 1 } 

dialog writememo {
  title "Write New Memo"
  size -1 -1 117 123
  option dbu
  edit "", 1, 2 7 110 10
  box "Nick", 2, 0 0 114 22
  box "Group Box", 3, 0 24 115 91
  edit "", 4, 2 31 111 81, multi autovs
  button "Send", 5, 0 116 25 7, flat
}
alias writememo { dialog -md writememo writememo }

on *:dialog:writememo:sclick:*:{
  if $did == 5 { /memoserv send %nickmemo %messagememo }
}
on *:dialog:writememo:edit:*:{
  if $did == 1 { set %nickmemo $did(1) }
  if $did == 4 { set %messagememo $did(4) }
}
on ^*:notice:*:*:{
  if ( $nick == MemoServ ) {
    if ( *you*have*a*new*memo*from* iswm $1- ) {
      did -r memomailer 2
      did -a memomailer 2 $1-  
      if ( *you*have*a*new*memo*from* iswm $1-) {
        did -r memomailer 1
        did -a memomailer 1 $7-
      }
    }
  }
 


But I dont know how to get it to list the memo when I click the nick. So say i get a memo from joe and joe's name shows up in the left list box when i click on it I want that memo to show up in the right list box and then when i hit del it will delete the memo that I am reading.


Link Copied to Clipboard