Log in

View Full Version : [HotKeyNet] Easy chat



Pocalypse
08-19-2009, 03:01 AM
I want to share this little tidbit of code I added to my script today, that let's me chat ingame without having to pause hotkeys before or after chatting, and doesn't send any of the chat to my other windows.

This works for 4 keys to start chat:

Y (reply)
shift + Y (re-reply)
/
Enter

and these keys to stop chat:

Enter
NumpadEnter
Esc

This code also includes <If ActiveWinIs WoW> like the rest of my code, so keys work regularly if I'm browsing or doing something else with hotkeynet running. If you don't use that generally, you can remove the those lines.

I use ScrollLockOn as my Do-Not-Pass key, so this code uses ScrollLockOff.
I also had to change my Pause key (that used to be just <ToggleHotKeys>.

Also, this won't work if you start your chat with the mouse (clicking a name in the chat log or rightclicking and clicking whisper).



<Hotkey Pause>
<If Chat is 1>
<SetVar Chat 0>
<TurnHotkeysOn>
<Else If HotkeysAreOn>
<SetVar Paused 1>
<ToggleHotKeys>
<Else If Paused is 1>
<SetVar Paused 0>
<ToggleHotKeys>
<Else>
<ToggleHotKeys>
<EndIf>

<Hotkey ScrollLockOff Oem2; ScrollLockOff Y; ScrollLockOff Shift Y>
<If ActiveWinIsNot WoW>
<SendLabel Fcs>
<Key %Trigger%>
<Else If Paused is 1>
<SendLabel Fcs>
<Key %Trigger%>
<Else>
<SendLabel Fcs>
<Key %Trigger%>
<SetVar Chat 1>
<TurnHotkeysOff>
<EndIf>

<Hotkey ScrollLockOff Enter; ScrollLockOff NumpadEnter>
<If ActiveWinIsNot WoW>
<SendLabel Fcs>
<Key %Trigger%>
<Else If Paused is 1>
<SendLabel Fcs>
<Key %Trigger%>
<Else If Chat is 1>
<SetVar Chat 0>
<SendLabel Fcs>
<Key %Trigger%>
<TurnHotkeysOn>
<Else>
<SetVar Chat 1>
<SendLabel Fcs>
<Key %Trigger%>
<TurnHotkeysOff>
<EndIf>

<Hotkey ScrollLockOff Esc>
<If ActiveWinIsNot WoW>
<SendLabel Fcs>
<Key %Trigger%>
<Else If Paused is 1>
<SendLabel Fcs>
<Key %Trigger%>
<Else If Chat is 1>
<SetVar Chat 0>
<SendLabel Fcs>
<Key %Trigger%>
<TurnHotkeysOn>
<Else>
<SendLabel w01, w02, w03, w04, w05, w06, w07, w08, w09, w10>
<Key %Trigger%>
<EndIf>

This is my Fcs label, it just does SendFocusWin:


<Label Fcs Local SendFocusWin>


Edit: This proved more complicated than I originally thought. I think I have it all fixed now though, I changed the above code a bit. If anyone uses this, please let me know if it works for you.

Multibocks
08-28-2009, 07:53 PM
What is with you and just posting a smiley with a number. WTH does that mean?

David
08-29-2009, 08:51 AM
It isn`t a smily. Atleast it isn`t smiling ;)

Khatovar
08-29-2009, 09:07 AM
I'm going to say spam. A google search on that URL shows it popping up all over the place .

Jafula
09-01-2009, 01:18 AM
Awesome, I love it. When I get around to redoing my HKN setup, I'm definitely going to use this. Thanks so much for sharing it!