PDA

View Full Version : last used chan


shikamu
06-07-2007, 05:43 PM
hi,

does any1 know how can i display text in the last used channel ?

like if i last typed /g blablabla
then the last used chan would be the guild chan.

if i last typed /y y0
the last used chan would be the yell chan;

i couldnt find anything in the wow api about that :/

thx for any reply

Shika

Jumpy
06-07-2007, 05:55 PM
I am not sure what you are asking for. If you hit Enter and then ALT + Up Arrow it puts the last thing you entered into the chat box. Are you looking for way to do this in an addon?

JaedxRapture
06-07-2007, 07:40 PM
I am not sure what you are asking for. If you hit Enter and then ALT + Up Arrow it puts the last thing you entered into the chat box. Are you looking for way to do this in an addon?

This is the UI/Mod Developer forum. He's asking here because he's looking for fellow authors to help him code something within an addon. Please try to remember that. It can be annoying to posters to see irrelevant info pop up and sometimes control the thread when they're trying to get help.

OP: I can't help you ATM because I'm away from my comp and thus all the WoW files, but it's likely held in a global variable. Search the files.

shikamu
06-07-2007, 08:03 PM
I am not sure what you are asking for. If you hit Enter and then ALT + Up Arrow it puts the last thing you entered into the chat box. Are you looking for way to do this in an addon?

yeah obviously as jaedx said, i want to add this in an addon.


This is the UI/Mod Developer forum. He's asking here because he's looking for fellow authors to help him code something within an addon. Please try to remember that. It can be annoying to posters to see irrelevant info pop up and sometimes control the thread when they're trying to get help.

OP: I can't help you ATM because I'm away from my comp and thus all the WoW files, but it's likely held in a global variable. Search the files.

humz havent actually searched in the global variables yet, didnt think about it tbh, i have just tried to find a method like GetLastChan or something; i'll have a look in the variables then, although im not sure where i can find them :o thx anyway ;^)

JaedxRapture
06-07-2007, 08:04 PM
yeah obviously as jaedx said, i want to add this in an addon.




humz havent actually searched in the global variables yet, didnt think about it tbh, i have just tried to find a method like GetLastChan or something; i'll have a look in the variables then thx ^_^

Yup. Should be under one of the files that handles the chats, obviously. Wish I could help you more, but I'm away from my comp till Sunday. /cry.

Tunga
07-07-2007, 03:06 AM
Not sure, I'd think you need to hook the event that fires on a chat send and store the channel type.

Jumpy
07-07-2007, 08:21 AM
JaedxRapture are you serious? I was trying to figure out what he wanted. I know very well what this forum is for and don't need a lecture.

And it is still unclear to me if he wants the text, the channel type or both and what he wants to do with that information. Store it, repeat it, display it? I couldn't tell from his question what he really wants to do.

shikamu
07-07-2007, 05:37 PM
JaedxRapture are you serious? I was trying to figure out what he wanted. I know very well what this forum is for and don't need a lecture.

And it is still unclear to me if he wants the text, the channel type or both and what he wants to do with that information. Store it, repeat it, display it? I couldn't tell from his question what he really wants to do.
lol is my english bad or is my post not clear enough ?
I want to display text, via an addon, in the last chat that the user has typed in. That is :
if you last used /g blablabla, then the last chan is the guild chan and thus when my addon has to display the text it should display, it should display it in the g chan. Don't think i can make it clearer.



Not sure, I'd think you need to hook the event that fires on a chat send and store the channel type.
that would work however i'm pretty sure there's already a variable that stores this information.

Jumpy
07-07-2007, 07:03 PM
Well take a look at the API for communication events and see if anything looks promising. http://www.wowwiki.com/Events/Communication

Here are the communication API events one of my addons uses:
CHAT_MSG_CHANNEL
CHAT_MSG_WHISPER
CHAT_MSG_GUILD
CHAT_MSG_OFFICER
CHAT_MSG_RAID
CHAT_MSG_PARTY

Duugu
07-07-2007, 10:29 PM
ChatEdit_LastTell (table value) and ChatEdit_LastTold (string)
But afaik the are only set for whispers.