Download
(6 Kb)
Download
Updated: 03/22/24 02:18 PM
Pictures
File Info
Compatibility:
Scions of Ithelia (9.3.0)
Updated:03/22/24 02:18 PM
Created:06/03/14 09:05 AM
Monthly downloads:2,953
Total downloads:85,278
Favorites:106
MD5:
9.3.0
Chat2Clipboard  Updated this week!  Popular! (More than 5000 hits)
Version: 1.12.2
by: sirinsidiator, Garkin
This simple addon adds a small button before each chat message that opens a textbox and allows you to copy the message to the clipboard by pressing ctrl+c.
Left click shows the popup which contains the message, right click shows a settings menu which let's you decide which parts of the message should be removed or replaced with plain text (powered by Garkin).
You can also shift+click on the button and it will ask to open an external link for google translate.

In addition there is a slash command "/m2c" which allows you to copy text from the control you are currently pointing your mouse at. This does not work with every text, but a lot of things can be copied. There is also special support for books and mails to copy them completely.

Depends on LibCustomMenu.
version 1.12.2
  • fixed copy button
  • fixed google translate url
  • updated to latest api version

version 1.12.1
  • removed outdated embedded libraries
  • updated to latest api version

version 1.12.0
  • fixed /m2c throwing an error when trying to copy mails
  • updated to latest api version
  • switched to semantic versioning

version 1.11
  • updated to latest api version
  • added "send to google translate" feature

version 1.10
  • removed compatibility code
  • increased character limit to 10000
  • added /m2c command to copy (almost) any text

version 1.9
  • updated to latest api version
  • small cosmetic improvement

version 1.8
  • updated to latest api version
  • brought back the clickable copy icon thanks to a new trick
  • updated LibCustomMenu to r4.1

version 1.7.1
  • updated to latest api version

version 1.7
  • updated to latest api version
  • added LibCustomMenu to prevent potential issues with menu entries
  • replaced copy icon with a simple 'c' because the trick I was using to make clickable icons does not work anymore in the new update

version 1.6
  • updated to latest api version
  • fixed potential error when chat message is nil

version 1.5
  • integrated Garkin's improved link substitution and settings
  • these changes also allow you to copy system and debug messages

version 1.4.1
  • fixed messages longer than 100 characters getting truncated

version 1.4
  • updated to latest api version
  • changed addon functionality to show a textbox after CopyAllTextToClipboard was made private in update 5

version 1.3
  • updated to latest api version
  • fixed compatiblity issues with pChat

version 1.2
  • updated to latest api version
  • updated how links are replaced in text only mode

version 1.1
  • updated to latest api version
  • added required add-on terms to manifest file
  • added a nice alert message instead of the simple chat output when a message is copied
Optional Files (0)


Archived Files (16)
File Name
Version
Size
Uploader
Date
1.12.1
6kB
sirinsidiator
04/20/21 03:01 PM
1.12.0
12kB
sirinsidiator
04/09/21 01:46 PM
1.11
12kB
sirinsidiator
02/16/17 01:54 PM
1.10
12kB
sirinsidiator
06/26/16 12:15 PM
1.9
12kB
sirinsidiator
04/26/16 04:02 PM
1.8
12kB
sirinsidiator
03/07/16 09:11 AM
1.7.1
11kB
sirinsidiator
11/02/15 07:16 AM
1.7
11kB
sirinsidiator
09/13/15 12:21 PM
1.6
5kB
sirinsidiator
03/06/15 02:47 PM
1.5
5kB
sirinsidiator
12/13/14 09:16 AM
1.4.1
4kB
sirinsidiator
11/09/14 09:44 AM
1.4
4kB
sirinsidiator
11/04/14 01:49 PM
1.3
4kB
sirinsidiator
09/16/14 01:07 PM
1.2
3kB
sirinsidiator
08/06/14 09:28 AM
1.1
3kB
sirinsidiator
06/25/14 11:05 AM
1.0
3kB
sirinsidiator
06/03/14 09:05 AM


Post A Reply Comment Options
Unread 04/19/15, 01:35 PM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
any chance to get an ability to copy text from Combat log statictis addon's window pls?
Report comment to moderator  
Reply With Quote
Unread 03/06/15, 03:06 PM  
Vaxure

Forum posts: 0
File comments: 10
Uploads: 0
Re: Re: Error message

Originally Posted by sirinsidiator
I added a fix. Please try if you still get the error in the latest version

Working Great again thank you for the quick response and a great addon!
Report comment to moderator  
Reply With Quote
Unread 03/06/15, 02:48 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1568
File comments: 1120
Uploads: 41
Re: Error message

I added a fix. Please try if you still get the error in the latest version

Originally Posted by Vaxure
Getting this error


user:/AddOns/Chat2Clipboard/StartUp.lua:220: operator .. is not supported for string .. nil
stack traceback:
user:/AddOns/Chat2Clipboard/StartUp.lua:220: in function 'AddMessage'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1009: in function 'SharedChatContainer:AddMessageToWindow'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1037: in function 'SharedChatContainer:AddEventMessageToWindow'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1041: in function 'SharedChatContainer:AddDebugMessage'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1783: in function 'SharedChatSystem:AddMessage'
user:/AddOns/pChat/pChat.lua:2716: in function 'CHAT_SYSTEM:AddMessage'
user:/AddOns/ThurisazGuildInfo/lib/thlib/util.lua:199: in function 'TI:showAnnouncement'
user:/AddOns/ThurisazGuildInfo/guild/announces.lua:86: in function 'AnnounceGuildMotDChanged'
user:/AddOns/ThurisazGuildInfo/guild/announces.lua:129: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:181: in function '(anonymous)'
Report comment to moderator  
Reply With Quote
Unread 03/06/15, 01:49 PM  
Vaxure

Forum posts: 0
File comments: 10
Uploads: 0
Error message

Getting this error


user:/AddOns/Chat2Clipboard/StartUp.lua:220: operator .. is not supported for string .. nil
stack traceback:
user:/AddOns/Chat2Clipboard/StartUp.lua:220: in function 'AddMessage'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1009: in function 'SharedChatContainer:AddMessageToWindow'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1037: in function 'SharedChatContainer:AddEventMessageToWindow'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1041: in function 'SharedChatContainer:AddDebugMessage'
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1783: in function 'SharedChatSystem:AddMessage'
user:/AddOns/pChat/pChat.lua:2716: in function 'CHAT_SYSTEM:AddMessage'
user:/AddOns/ThurisazGuildInfo/lib/thlib/util.lua:199: in function 'TI:showAnnouncement'
user:/AddOns/ThurisazGuildInfo/guild/announces.lua:86: in function 'AnnounceGuildMotDChanged'
user:/AddOns/ThurisazGuildInfo/guild/announces.lua:129: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:181: in function '(anonymous)'
Report comment to moderator  
Reply With Quote
Unread 12/10/14, 04:13 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by sirinsidiator
Originally Posted by QuadroTony
Originally Posted by Garkin

@sirinsidiator:
If you like any part of modified code, feel free to use it.
ye, will be nice to update this addon too
I will definitely make an update with Garkin's modified version, but I want to review the code first and am busy with another addon atm.
I have updated Chat2Clipboard in my dropbox folder again. At first I was trying to fix issues with additional chat containers and due to fixed code it now can copy all messages, including system and debug messages.
Report comment to moderator  
Reply With Quote
Unread 12/10/14, 02:33 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
Originally Posted by sirinsidiator
Originally Posted by QuadroTony
Originally Posted by Garkin

@sirinsidiator:
If you like any part of modified code, feel free to use it.
ye, will be nice to update this addon too
I will definitely make an update with Garkin's modified version, but I want to review the code first and am busy with another addon atm.
ye, there was a little bug in initial version og Garkin, he fixed it yesterday, link are the same 0 in his dropbox
Report comment to moderator  
Reply With Quote
Unread 12/10/14, 12:41 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1568
File comments: 1120
Uploads: 41
Originally Posted by QuadroTony
Originally Posted by Garkin

@sirinsidiator:
If you like any part of modified code, feel free to use it.
ye, will be nice to update this addon too
I will definitely make an update with Garkin's modified version, but I want to review the code first and am busy with another addon atm.
Report comment to moderator  
Reply With Quote
Unread 12/09/14, 03:32 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
Originally Posted by Garkin

@sirinsidiator:
If you like any part of modified code, feel free to use it.
ye, will be nice to update this addon too
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 11:08 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
Originally Posted by Garkin
@QuadroTony:
As promised I have uploaded modified version to my Dropbox folder (link in my signature).
Copy icon now displays settings menu on right click. Left click is copy with settings applied, any other mouse button is raw copy.



@sirinsidiator:
If you like any part of modified code, feel free to use it.
ty, man! you are the best
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 10:51 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
@QuadroTony:
As promised I have uploaded modified version to my Dropbox folder (link in my signature).
Copy icon now displays settings menu on right click. Left click is copy with settings applied, any other mouse button is raw copy.



@sirinsidiator:
If you like any part of modified code, feel free to use it.
Last edited by Garkin : 12/08/14 at 10:56 AM.
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 06:07 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by QuadroTony
Originally Posted by sirinsidiator
Originally Posted by QuadroTony
so, i cant copy other messages with links to the items/achievements with this addon?
to be able to post this messages again, with the same link, not only text of the link?


like when i copy my own message before sending it to the chat

when i copy my own message(before i send it, in the text editor field) and past it to the notepad, it looks like this:
LFG |H1:achievement:707:0:0|h|h|H1:achievement:396:0:0|h|h

but when i copy it by this addon, from chat directly, i cant get the same result
too bad....
mby you can do smthing about it? this addon will become alot more usefull, than just simple copypast of plain text, if we will be able copypast links to the items/achievements in proper format
It should already work that way. You have to right click on the icon and it will copy the message with all links intact. Left click tries to substitute all links and invisible stuff so it looks like the message in chat even when you copy it outside of the game.
but its loks like

Code:
|c8F8F8F|H1:p:0:3|h[10:46:35]|h |r|cdb5800|H1:character:Czenia|h[Czenia]|h: |r|cff9c3c|H1:item:33440:23:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h|r
oh i understand, it also copying things before msg, time and name, provided by pChat addon. any ways to exclude pChat features from msg??
Everything is possible...
You can probably add settings which links you want replaced and if you want removed channel and sender names. It could be in addon settings, in the right-click context menu or checkboxes on the copy window. I will try to make modified version in a few hours.
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 02:46 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
Originally Posted by sirinsidiator
Originally Posted by QuadroTony
so, i cant copy other messages with links to the items/achievements with this addon?
to be able to post this messages again, with the same link, not only text of the link?


like when i copy my own message before sending it to the chat

when i copy my own message(before i send it, in the text editor field) and past it to the notepad, it looks like this:
LFG |H1:achievement:707:0:0|h|h|H1:achievement:396:0:0|h|h

but when i copy it by this addon, from chat directly, i cant get the same result
too bad....
mby you can do smthing about it? this addon will become alot more usefull, than just simple copypast of plain text, if we will be able copypast links to the items/achievements in proper format
It should already work that way. You have to right click on the icon and it will copy the message with all links intact. Left click tries to substitute all links and invisible stuff so it looks like the message in chat even when you copy it outside of the game.
but its loks like

Code:
|c8F8F8F|H1:p:0:3|h[10:46:35]|h |r|cdb5800|H1:character:Czenia|h[Czenia]|h: |r|cff9c3c|H1:item:33440:23:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h|r
oh i understand, it also copying things before msg, time and name, provided by pChat addon. any ways to exclude pChat features from msg??
Last edited by QuadroTony : 12/08/14 at 02:48 AM.
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 02:42 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1568
File comments: 1120
Uploads: 41
Re: Achievement and Book links

Originally Posted by Garkin
I made a small adjustment to the routine which replaces links with text to support achievements and books. So instead of [link] you will get for example [Epic Acquirer] or [Redguards, History and Heroes, V. 3]. In order to support all links with text I have replaced "linkTypeWithLabel[type]" with "#label > 0" (so linkTypeWithLabel table is no longer needed).

If you want to test it, here is modified code:
Thanks Garkin!
This is something I wanted to do for a while, but didn't have the motivation to look into
Report comment to moderator  
Reply With Quote
Unread 12/08/14, 02:41 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1568
File comments: 1120
Uploads: 41
Originally Posted by QuadroTony
so, i cant copy other messages with links to the items/achievements with this addon?
to be able to post this messages again, with the same link, not only text of the link?


like when i copy my own message before sending it to the chat

when i copy my own message(before i send it, in the text editor field) and past it to the notepad, it looks like this:
LFG |H1:achievement:707:0:0|h|h|H1:achievement:396:0:0|h|h

but when i copy it by this addon, from chat directly, i cant get the same result
too bad....
mby you can do smthing about it? this addon will become alot more usefull, than just simple copypast of plain text, if we will be able copypast links to the items/achievements in proper format
It should already work that way. You have to right click on the icon and it will copy the message with all links intact. Left click tries to substitute all links and invisible stuff so it looks like the message in chat even when you copy it outside of the game.
Report comment to moderator  
Reply With Quote
Unread 12/07/14, 06:28 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Achievement and Book links

I made a small adjustment to the routine which replaces links with text to support achievements and books. So instead of [link] you will get for example [Epic Acquirer] or [Redguards, History and Heroes, V. 3]. In order to support all links with text I have replaced "linkTypeWithLabel[type]" with "#label > 0" (so linkTypeWithLabel table is no longer needed).

If you want to test it, here is modified code:
Lua Code:
  1. local library = {}
  2. for i = 1, GetNumLoreCategories() do
  3.     local _, numCollections = GetLoreCategoryInfo(i)
  4.     for j = 1, numCollections do
  5.         local _, _, _, totalBooks =  GetLoreCollectionInfo(i, j)
  6.         for k = 1, totalBooks do
  7.             local title = GetLoreBookInfo(i, j, k)
  8.             local _, _, _, bookId = ZO_LinkHandler_ParseLink(GetLoreBookLink(i, j, k))
  9.             library[bookId] = title
  10.         end
  11.     end
  12. end
  13.  
  14. local function HandleCopyLink(link, button, text, color, linkType, copyBufferIndex, messageIndex)
  15.     if(linkType == COPY_LINK_TYPE) then
  16.         copyBufferIndex = tonumber(copyBufferIndex)
  17.         messageIndex = tonumber(messageIndex)
  18.         local copyBuffer = copyBufferList[copyBufferIndex]
  19.         assert(copyBuffer ~= nil, "copy buffer not found")
  20.  
  21.         local message = copyBuffer:Get(messageIndex)
  22.         if button == MOUSE_BUTTON_LEFT then
  23.             message = message:gsub("(|H.-|h.-|h)", function(linkToReplace)
  24.                 local label, style, type, id = ZO_LinkHandler_ParseLink(linkToReplace)
  25.                 if(type == ITEM_LINK_TYPE) then
  26.                     return zo_strformat((tonumber(style) == LINK_STYLE_BRACKETS and SI_LINK_FORMAT_ITEM_NAME_BRACKETS or SI_LINK_FORMAT_ITEM_NAME), GetItemLinkName(linkToReplace))
  27.                 elseif(type == ACHIEVEMENT_LINK_TYPE) then
  28.                     return zo_strformat((tonumber(style) == LINK_STYLE_BRACKETS and SI_LINK_FORMAT_GENERIC_NAME_BRACKETS or SI_LINK_FORMAT_GENERIC_NAME), GetAchievementInfo(tonumber(id)))
  29.                 elseif(type == BOOK_LINK_TYPE) then
  30.                     return zo_strformat((tonumber(style) == LINK_STYLE_BRACKETS and SI_LINK_FORMAT_GENERIC_NAME_BRACKETS or SI_LINK_FORMAT_GENERIC_NAME), (library[id] or GetString(SI_ITEM_SUB_TYPE_BOOK)))
  31.                 elseif(#label > 0) then
  32.                     return label
  33.                 else
  34.                     return "[link]"
  35.                 end
  36.             end) -- remove links
  37.             message = message:gsub("|t.-|t", "") -- remove icons
  38.             message = message:gsub("|c......(.-)|r", "%1") -- remove color tags with an end tag
  39.             message = message:gsub("|c......(.-)", "%1") -- remove remaining malformed color tags
  40.             message = message:gsub("|u.-|u", "") -- remove other formating
  41.         end
  42.         clipBoardControl:SetText(message)
  43.         window:SetHidden(false)
  44.         clipBoardControl:TakeFocus()
  45.         return true
  46.     end
  47. end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.