Download
(2 Kb)
Download
Updated: 04/06/21 10:57 AM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Updated:04/06/21 10:57 AM
Created:04/05/21 09:47 AM
Monthly downloads:46
Total downloads:2,720
Favorites:6
MD5:
MailTo
Version: 1.1.1
by: DeadMoroz [More]
This simple addon adds "Send mail" action to context menu, which opens when you right-click on player name in chat window. When chosen, it opens compose new mail window with "To" field set to player you clicked on. If compose window was already open, then it (re)places chosen player name in "To" field.

-- RU --
Этот аддон добавляет пункт "Отправить письмо" в контекстное меню, которое появляется когда кликаете (правый клик) на имени игрока в чате. При выборе этого пункта, открывается окно отправки почтового сообщения и в поле "Получатель" будет записано имя игрока (аккаунт) на котором было вызвано контекстное меню. Если контекстное меню было вызвано, когда окно отправки сообщения было уже открыто, то поле "Получатель" будет заменено на имя игрока на котором было вызвано контекстное меню.

Supported languages (локализация): EN, DE, ES, FR, RU

Depends (зависимости):
LibCustomMenu
1.1.1 - Fixed typo in RegisterPlayerContextMenu, added LibCustomMenu minimum version dependancy
1.1.0 - Added localization files for de, es and fr languages
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
1.1.0
2kB
DeadMoroz
04/05/21 03:12 PM


Post A Reply Comment Options
Unread 05/23/21, 08:09 AM  
MrGibsche

Forum posts: 0
File comments: 2
Uploads: 0
never mind :-D
Last edited by MrGibsche : 05/23/21 at 08:15 AM.
Report comment to moderator  
Reply With Quote
Unread 04/06/21, 08:14 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4952
File comments: 6019
Uploads: 78
Seems it is Dolgubons Lazy Writ Creator, includes version 6.8 and does not load it via the txt file properly, but harcoded from DolgubonsLazyWritCreator.txt:
libs\LibCustomMenu\LibCustomMenu.lua
Report comment to moderator  
Reply With Quote
Unread 04/06/21, 07:59 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4952
File comments: 6019
Uploads: 78
Yes hey have it bundled but with the proper txt, no hardcoded old versions as it seems.
Have to search them again and test with the same char like yesterday.

Originally Posted by DeadMoroz
Originally Posted by Baertram
Getting this error message upon login:
Code:
user:/AddOns/MailTo/MailTo.lua:37: function expected instead of nil
|rstack traceback:
user:/AddOns/MailTo/MailTo.lua:37: in function 'MailTo.onInitialize'
|caaaaaa<Locals> event = 65536, addonName = "MailTo", LCM = [table:1]{CATEGORY_SECONDARY = 3, CATEGORY_EARLY = 1, CATEGORY_PRIMARY = 2, CATEGORY_TERTIARY = 4, CATEGORY_LATE = 6, CATEGORY_QUATERNARY = 5, DIVIDER = "-"} </Locals>|r
You got a typo there:
LCM.CATEGORY_LATER -> LCM.CATEGORY_LATE


But this won't fix it yet :-(
Seems that LCM:RegisterPlayerContextMenu is not found? Maybe EVENT_ADD_ON_LOADED is too early and you need to use EVENT_PLAYER_ACTIVATED as the chat will be ready at that "later" event first.

Lua Code:
  1. function MailTo.PlayerContextMenu(playerName, rawName)
  2.   AddCustomMenuItem(GetString(MAIL_TO_TITLE), function()
  3.     MailTo.MailSend(playerName)
  4.   end)
  5.   return
  6. end
  7.  
  8. MailTo.wasPlayerActivated = false
  9. function MailTo.onPlayerActivated(event, firstRun)
  10.     if MailTo.wasPlayerActivated then return end
  11.     local LCM = LibCustomMenu
  12.     if LCM == nil then
  13.       return
  14. d("<LCM missing!")
  15.     end
  16. d(">LCM found")
  17.     if not LCM.RegisterPlayerContextMenu then
  18.         d("<LCM:RegisterPlayerContextMenu not found!")
  19.     else
  20.         d(">LCM:RegisterPlayerContextMenu found!")
  21.         LCM:RegisterPlayerContextMenu(MailTo.PlayerContextMenu, LCM.CATEGORY_LATE)
  22.         MailTo.wasPlayerActivated = true
  23.     end
  24. end
  25.  
  26. function MailTo.onInitialize(event, addonName)
  27.  
  28.     if addonName == MailTo.addonName then
  29.         EVENT_MANAGER:UnregisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED)
  30.         EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_PLAYER_ACTIVATED, MailTo.onPlayerActivated)
  31.     end
  32. end
  33.  
  34. EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED, MailTo.onInitialize)
-> Also tested, not working. Dunno why but your addon is not working for me :-(
-> It always says "d("<LCM:RegisterPlayerContextMenu not found!")"


Another info:
You should change your txt file to request the newest version (via the >= tag addition) of LibCustomMenu so that no older versions loaded:

Code:
## DependsOn: LibCustomMenu>=695
Because the function RegisterPlayerContextMenu was added with version 692 first, and was not available before.
Typo fixed. Required library version set.

Check if any addon have bundled LibCustomMenu library - this can be the source of problem
Report comment to moderator  
Reply With Quote
Unread 04/06/21, 11:01 AM  
DeadMoroz
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally Posted by Baertram
Getting this error message upon login:
Code:
user:/AddOns/MailTo/MailTo.lua:37: function expected instead of nil
|rstack traceback:
user:/AddOns/MailTo/MailTo.lua:37: in function 'MailTo.onInitialize'
|caaaaaa<Locals> event = 65536, addonName = "MailTo", LCM = [table:1]{CATEGORY_SECONDARY = 3, CATEGORY_EARLY = 1, CATEGORY_PRIMARY = 2, CATEGORY_TERTIARY = 4, CATEGORY_LATE = 6, CATEGORY_QUATERNARY = 5, DIVIDER = "-"} </Locals>|r
You got a typo there:
LCM.CATEGORY_LATER -> LCM.CATEGORY_LATE


But this won't fix it yet :-(
Seems that LCM:RegisterPlayerContextMenu is not found? Maybe EVENT_ADD_ON_LOADED is too early and you need to use EVENT_PLAYER_ACTIVATED as the chat will be ready at that "later" event first.

Lua Code:
  1. function MailTo.PlayerContextMenu(playerName, rawName)
  2.   AddCustomMenuItem(GetString(MAIL_TO_TITLE), function()
  3.     MailTo.MailSend(playerName)
  4.   end)
  5.   return
  6. end
  7.  
  8. MailTo.wasPlayerActivated = false
  9. function MailTo.onPlayerActivated(event, firstRun)
  10.     if MailTo.wasPlayerActivated then return end
  11.     local LCM = LibCustomMenu
  12.     if LCM == nil then
  13.       return
  14. d("<LCM missing!")
  15.     end
  16. d(">LCM found")
  17.     if not LCM.RegisterPlayerContextMenu then
  18.         d("<LCM:RegisterPlayerContextMenu not found!")
  19.     else
  20.         d(">LCM:RegisterPlayerContextMenu found!")
  21.         LCM:RegisterPlayerContextMenu(MailTo.PlayerContextMenu, LCM.CATEGORY_LATE)
  22.         MailTo.wasPlayerActivated = true
  23.     end
  24. end
  25.  
  26. function MailTo.onInitialize(event, addonName)
  27.  
  28.     if addonName == MailTo.addonName then
  29.         EVENT_MANAGER:UnregisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED)
  30.         EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_PLAYER_ACTIVATED, MailTo.onPlayerActivated)
  31.     end
  32. end
  33.  
  34. EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED, MailTo.onInitialize)
-> Also tested, not working. Dunno why but your addon is not working for me :-(
-> It always says "d("<LCM:RegisterPlayerContextMenu not found!")"


Another info:
You should change your txt file to request the newest version (via the >= tag addition) of LibCustomMenu so that no older versions loaded:

Code:
## DependsOn: LibCustomMenu>=695
Because the function RegisterPlayerContextMenu was added with version 692 first, and was not available before.
Typo fixed. Required library version set.

Check if any addon have bundled LibCustomMenu library - this can be the source of problem
Report comment to moderator  
Reply With Quote
Unread 04/05/21, 06:56 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4952
File comments: 6019
Uploads: 78
Getting this error message upon login:
Code:
user:/AddOns/MailTo/MailTo.lua:37: function expected instead of nil
|rstack traceback:
user:/AddOns/MailTo/MailTo.lua:37: in function 'MailTo.onInitialize'
|caaaaaa<Locals> event = 65536, addonName = "MailTo", LCM = [table:1]{CATEGORY_SECONDARY = 3, CATEGORY_EARLY = 1, CATEGORY_PRIMARY = 2, CATEGORY_TERTIARY = 4, CATEGORY_LATE = 6, CATEGORY_QUATERNARY = 5, DIVIDER = "-"} </Locals>|r
You got a typo there:
LCM.CATEGORY_LATER -> LCM.CATEGORY_LATE


But this won't fix it yet :-(
Seems that LCM:RegisterPlayerContextMenu is not found? Maybe EVENT_ADD_ON_LOADED is too early and you need to use EVENT_PLAYER_ACTIVATED as the chat will be ready at that "later" event first.

Lua Code:
  1. function MailTo.PlayerContextMenu(playerName, rawName)
  2.   AddCustomMenuItem(GetString(MAIL_TO_TITLE), function()
  3.     MailTo.MailSend(playerName)
  4.   end)
  5.   return
  6. end
  7.  
  8. MailTo.wasPlayerActivated = false
  9. function MailTo.onPlayerActivated(event, firstRun)
  10.     if MailTo.wasPlayerActivated then return end
  11.     local LCM = LibCustomMenu
  12.     if LCM == nil then
  13.       return
  14. d("<LCM missing!")
  15.     end
  16. d(">LCM found")
  17.     if not LCM.RegisterPlayerContextMenu then
  18.         d("<LCM:RegisterPlayerContextMenu not found!")
  19.     else
  20.         d(">LCM:RegisterPlayerContextMenu found!")
  21.         LCM:RegisterPlayerContextMenu(MailTo.PlayerContextMenu, LCM.CATEGORY_LATE)
  22.         MailTo.wasPlayerActivated = true
  23.     end
  24. end
  25.  
  26. function MailTo.onInitialize(event, addonName)
  27.  
  28.     if addonName == MailTo.addonName then
  29.         EVENT_MANAGER:UnregisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED)
  30.         EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_PLAYER_ACTIVATED, MailTo.onPlayerActivated)
  31.     end
  32. end
  33.  
  34. EVENT_MANAGER:RegisterForEvent(MailTo.addonName, EVENT_ADD_ON_LOADED, MailTo.onInitialize)
-> Also tested, not working. Dunno why but your addon is not working for me :-(
-> It always says "d("<LCM:RegisterPlayerContextMenu not found!")"


Another info:
You should change your txt file to request the newest version (via the >= tag addition) of LibCustomMenu so that no older versions loaded:

Code:
## DependsOn: LibCustomMenu>=695
Because the function RegisterPlayerContextMenu was added with version 692 first, and was not available before.
Last edited by Baertram : 04/05/21 at 07:33 PM.
Report comment to moderator  
Reply With Quote
Unread 04/05/21, 03:14 PM  
DeadMoroz
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally Posted by Baertram
Thanks for the addon.

Some translations for different languages:

English - en.lua (should be in your txt file, before line $(language).lua) as hardcoded call to en.lua and not in your MailTo.lua file.
It's also common to put the translations files in a subfolder i18n or lang or localization.

Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Send mail")
German - de.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Mail an Benutzer senden")
French - fr.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Envoyer un mail")
Spanish - es.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Enviar correo al usuario")
Thanks for localization strings! Mod updated.
Report comment to moderator  
Reply With Quote
Unread 04/05/21, 01:34 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4952
File comments: 6019
Uploads: 78
Thanks for the addon.

Some translations for different languages:

English - en.lua (should be in your txt file, before line $(language).lua) as hardcoded call to en.lua and not in your MailTo.lua file.
It's also common to put the translations files in a subfolder i18n or lang or localization.

Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Send mail")
German - de.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Mail an Benutzer senden")
French - fr.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Envoyer un mail")
Spanish - es.lua:
Code:
ZO_CreateStringId("MAIL_TO_TITLE",         "Enviar correo al usuario")
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: