Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO]Enter to chat


1123121
 Share

Recommended Posts

First make a new label on your frmmaingame and call it "ChatBoxFocus", and put it right next to your chatbar. Change the Caption to "G". (Watch screenshot below)

After that.

In ModHandleData add this. (Client side)
```
'---------------------------
Public Sub SetFocusOnChat()
    frmMainGame.txtMyChat.SetFocus
End Sub
'----------------------------
Public Sub SetFocusOnGame()
    frmMainGame.picScreen.SetFocus
End Sub

```

in modInput put this. (Client side)
```
'--------------------------
If GetKeyState(vbKeyReturn) Then
        frmMainGame.ChatBoxFocus.Caption = "C"
        Call SetFocusOnChat
    Else
    If frmMainGame.ChatBoxFocus.Caption = "C" Then
        frmMainGame.ChatBoxFocus.Caption = "G"
        Call SetFocusOnGame
    End If
    End If

```That should do the trick I believe. If not, feel free to tell me.

Edit: The code I gave you above, will work perfectly in case you switch over to WASD movement. It prevents your chatbox from filling up when walking around with your char.

EDIT: I removed the error handlers, as I realised that there couldn't be any error in that sub whatsoever.

Aramyth.
Link to comment
Share on other sites

I have added it bottom ModHandleData```
'---------------------------
Public Sub SetFocusOnChat ()
    frmMainGame.txtMyChat.SetFocus
End Sub
'----------------------------
Public Sub SetFocusOnGame ()
    frmMainGame.picScreen.SetFocus
End Sub
```And this bottom in modInput and i see error
```
'--------------------------
Jeśli GetKeyState (vbKeyReturn) Then
        = "C" frmMainGame.ChatBoxFocus.Caption
        Call SetFocusOnChat
    Inne
    JeÅ›li frmMainGame.ChatBoxFocus.Caption = "C" Wtedy
        = "G" frmMainGame.ChatBoxFocus.Caption
        Call SetFocusOnGame
    End If
    End If
```[http://img543.imageshack.us/img543/967/90042112.png](http://img543.imageshack.us/img543/967/90042112.png)
Link to comment
Share on other sites

You will need to be more specific. Which error did you get?, You can send me the whole Sub from modInput so i can check what you did wrong if you want.

The code works perfectly fine if you did exactly as i said, because i am using the exact same system without any problem.

Regards Aramyth.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...