All pastes #362773 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-19 01:23 UTC
rendered paste body
on *:dialog:addressbook:sclick:*: {
  if ($did == 3) { dialog -c addressbook addressbook }
  ; We want to add someone, once we add the person, save to a configuration file.
  if ($did == 1) { 
    var %newemail $input(Enter the contact's e-mail address:,ioaegv,New Contact)
    echo -a %newemail
    did -a addressbook 2 %newemail

    var %numemails $did(addressbook,2).lines 
    writeini $qt($scriptdirdata/contacts.lst) Contacts EAddress $+ %numemails %newemail
  }
  if ($did == 4) { 
    set %curr.email $did(addressbook,2).seltext
    echo -a %curr.email
    did -a mailer 2 %curr.email
    dialog -c addressbook
  }
}