- Code: Select all
{ Append a note to an existing address entry.
Set $Address "Foo Bar <foo@bar.com>"
IsAddressPresent &SW $Address $CurrentAddressBook
If &SW Then Exists
MessageBox "Address does not exist, either add <foo@bar.com> to your address book or edit the script and change the email address in line 3"
:Done
Exit
:Exists
Set $EMail $Address
ExtractEMail $EMail
GetRawAddress $AddressEntry $EMail $CurrentAddressBook
ReadCSV $AddressEntry $AddressEntry
GetLine $Notes 3 $AddressEntry
ReadCSV $Notes $Notes
LineCount #n $Notes
InputBox $Note "New note to append"
If $Note = "" Then Done
WriteCSV $Note $Note
AppendBody $Notes $Note
WriteCSV $Notes $Notes
DeleteLine $AddressEntry 3 1
InsertLine $AddressEntry 3 $Notes
WriteCSV $AddressEntry $AddressEntry
RemoveAddress $CurrentAddressBook $EMail
AddRawAddress $CurrentAddressBook $AddressEntry
Exit
First add address <foo@bar.com> to your current address book, make sure there is one line in the note entry. Then run this script using Debug mode. It appends notes to the note field. The problem is that sometimes Poco will throw an access violation and the address will disappear from the address book. I have found that if I switch address books and return the address reappears. (Both the access violation and the disappearing address are problems but they may be related, solving the access violation may solve the disappearing address problem).