dan7886 / gta2-game-hunter

Automatically exported from code.google.com/p/gta2-game-hunter
0 stars 0 forks source link

Accidental game start due to focus being on "Start" button instead of chat box #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Press "Create Game", choose a level, then press "Create Game".
2. Network GTA2 appears and loads the lobby.
3. Typing and pressing "Return" starts the game, because focus is on the 
"Start" button.

What is the expected output? What do you see instead?
The typed message would be added to the "Network GTA2" lobby chat history when 
pressing "Return". Instead, the game is started.

What version of the product are you using? On what operating system?
GH1.537l (beta)

Please provide any additional information below.
Tile Selektor finds a control within a window and affects the value of a 
property in that window. Perhaps a similar technique could locate the chat box 
and focus it each time the lobby is started?

Original issue reported on code.google.com by aa22c...@gmail.com on 25 Apr 2012 at 2:48

GoogleCodeExporter commented 9 years ago
Public Const WM_ACTIVATE = &H6

Call SendMessage(lngHandleChat, WM_ACTIVATE, 1, 0)

That will make the GTA2 chatbox active instead of the Start button. Just have 
to figure out when exactly to send it.

Original comment by gtamulti on 25 Apr 2012 at 4:35

GoogleCodeExporter commented 9 years ago
If the GTA2 lobby has been open for 1 second then chatbox gets focus. You won't 
even notice the 1 second since GH detects the lobby before you can see it.

If lngLobby = 1 Then Call SendMessage(lngHandleChat, WM_ACTIVATE, 1, 0)

Original comment by gtamulti on 25 Apr 2012 at 5:09