Thread Tools Display Modes
12/19/14, 09:06 AM   #1
stealthbr
Join Date: Sep 2014
Posts: 12
Cycle through chat channels w/keybind

Hello everyone. I would like to know if it's possible to create an addon that allows the player to cycle through the chat channels with a keybind. In Dungeons & Dragons Online, for instance, you can cycle between chat channels by pressing "[" to go to the chat channel on the left or "]" to go to the chat channel on the right.

Thanks!
  Reply With Quote
12/19/14, 10:44 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by stealthbr View Post
Hello everyone. I would like to know if it's possible to create an addon that allows the player to cycle through the chat channels with a keybind. In Dungeons & Dragons Online, for instance, you can cycle between chat channels by pressing "[" to go to the chat channel on the left or "]" to go to the chat channel on the right.

Thanks!
Do you mean chat channels or chat tabs? It would be completely different code.

Anyway I assume that you want to switch between chat tabs.

Here is source code:

CycleChatTabs.txt
Code:
## APIVersion: 100010
## Title: |cEFEBBECycle Chat Tabs|r 0.1
## Description: Cycle between chat tabs using the keybindings.
## Version: 0.1
## Author: |cEFEBBEGarkin|r

CycleChatTabs.lua
bindings.xml
CycleChatTabs.lua
Lua Code:
  1. ZO_CreateStringId("SI_BINDING_NAME_CYCLE_CHAT_TABS_LEFT",  "Cycle through chat tabs - left")
  2. ZO_CreateStringId("SI_BINDING_NAME_CYCLE_CHAT_TABS_RIGHT", "Cycle through chat tabs - right")

bindings.xml
XML Code:
  1. <Bindings>
  2.     <Layer name="SI_KEYBINDINGS_LAYER_GENERAL">
  3.         <Category name="SI_KEYBINDINGS_CATEGORY_USER_INTERFACE">
  4.             <Action name="CYCLE_CHAT_TABS_LEFT">
  5.                 <Down>
  6.                     local container = CHAT_SYSTEM.primaryContainer
  7.                     local index = container.currentBuffer:GetParent().tab.index
  8.                     index = (index == 1) and (container.hiddenTabStartIndex - 1) or (index - 1)
  9.                     container.tabGroup:SetClickedButton(container.windows[index].tab)
  10.                 </Down>
  11.             </Action>
  12.  
  13.             <Action name="CYCLE_CHAT_TABS_RIGHT">
  14.                 <Down>
  15.                     local container = CHAT_SYSTEM.primaryContainer
  16.                     local index = container.currentBuffer:GetParent().tab.index
  17.                     index = (index == container.hiddenTabStartIndex - 1) and 1 or (index + 1)
  18.                     container.tabGroup:SetClickedButton(container.windows[index].tab)
  19.                 </Down>
  20.             </Action>
  21.         </Category>
  22.     </Layer>
  23. </Bindings>

Or if you want, I have uploaded it to my Dropbox folder as "CycleChatTabs-0.1.zip" (link in my signature).

Last edited by Garkin : 12/19/14 at 02:09 PM. Reason: Renamed because of Minion support.
  Reply With Quote
12/19/14, 12:13 PM   #3
stealthbr
Join Date: Sep 2014
Posts: 12
Originally Posted by Garkin View Post
Do you mean chat channels or chat tabs? It would be completely different code.

Anyway I assume that you want to switch between chat tabs.

Or if you want, I have uploaded it to my Dropbox folder as "ChatTabs-0.1.zip" (link in my signature).

Awesome! It works perfectly, thanks Garkin! Also, I sent you a PM regarding a few bugs I'm encountering with another addon I requested that you created the code for. Do you think there's a way to solve the bugs I mentioned in the PM?

Last edited by stealthbr : 12/19/14 at 12:15 PM.
  Reply With Quote
12/19/14, 01:38 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by stealthbr View Post
Awesome! It works perfectly, thanks Garkin! Also, I sent you a PM regarding a few bugs I'm encountering with another addon I requested that you created the code for. Do you think there's a way to solve the bugs I mentioned in the PM?
To be honest I was able to reproduce bug in HideTargetFrame you describe, but I wasn't able to find out what is going on. So have made some changes to the addon and now trying if it works better.
(test version is "HideTargetFrame-1.2_modified.zip" in my Dropbox folder)
  Reply With Quote
12/19/14, 01:56 PM   #5
stealthbr
Join Date: Sep 2014
Posts: 12
Originally Posted by Garkin View Post
To be honest I was able to reproduce bug in HideTargetFrame you describe, but I wasn't able to find out what is going on. So have made some changes to the addon and now trying if it works better.
(test version is "HideTargetFrame-1.2_modified.zip" in my Dropbox folder)
Thanks, I will give it a try. BTW, the name ChatTabs is apparently already being used by another addon, so the Minion Addon Manager thought I had this other addon installed. I changed the name to CycleChatTabs instead.
  Reply With Quote
12/19/14, 02:10 PM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by stealthbr View Post
Thanks, I will give it a try. BTW, the name ChatTabs is apparently already being used by another addon, so the Minion Addon Manager thought I had this other addon installed. I changed the name to CycleChatTabs instead.
Renamed in both original post and Dropbox.
  Reply With Quote
11/29/17, 12:10 PM   #7
HowellQagan
 
HowellQagan's Avatar
Join Date: Dec 2016
Posts: 11
Sorry for necroing this thread but I'm looking for something like this, and haven't found anything else.

However both keybindings scroll the tabs to the left only. Could someone please tell me why it's not working anymore as it did back then? What should be changed?

edit: Never mind, I realized pChat has a switch forward, I'll ask for a switch backward there.

Last edited by HowellQagan : 11/29/17 at 12:36 PM.
  Reply With Quote
11/29/17, 02:31 PM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Hi,

if you just want to cycle through the chat "tabs" (not the channels!) you can use FCOChatTabBrain for this.
It provides keybindings for it, and many other features like sound alerts, automatic chat tab switch to incoming messages, chat fade out etc.

Never needed to use keybinds to change the chat channel due to this as the addon changes to the channel of incoming messages for you.
  Reply With Quote
12/01/17, 12:06 PM   #9
HowellQagan
 
HowellQagan's Avatar
Join Date: Dec 2016
Posts: 11
Originally Posted by Baertram View Post
Hi,

if you just want to cycle through the chat "tabs" (not the channels!) you can use FCOChatTabBrain for this.
It provides keybindings for it, and many other features like sound alerts, automatic chat tab switch to incoming messages, chat fade out etc.

Never needed to use keybinds to change the chat channel due to this as the addon changes to the channel of incoming messages for you.
Yeah in the meantime I realised I'm a complete moron. This addon from Garkin works fine still, maybe I shouldn't really try to play when I'm so tired.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Cycle through chat channels w/keybind

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off