Send pre defined 'keystrokes' + string (txt) to window

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
mc2r
wxWorld Domination!
wxWorld Domination!
Posts: 1195
Joined: Thu Feb 22, 2007 4:47 pm
Location: Denver, Co
Contact:

Post by mc2r »

Komerad wrote:All i need to figure out now : How to send an 'ENTER' to guildwars or better.. in a way that guildwars will accept it as an enter..
Don't the bots send ENTER? I'd think the answer should be there.

But one thing you could try and this is just a guess is send "\n".

remembering of course that you'll have to escape the \

Code: Select all

wxString EnterString = wxT("\\n");

Complete stab in the dark that.

Another possibility is to use something like wireshark to see what the application sends when you hit enter during a chat.

A quick google shows that guildwars uses port TCP:6112

Might have to do some investigating on your own to confirm that.
Komerad
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Mar 03, 2009 9:42 pm

Post by Komerad »

Not sure about the \n as all methods tested seemed to have problems with showing upper cases, numbers and quiet some other 'symbols', wich makes splitting up the string and proces every character in it trough a far loop needed in order to have the output == input.

One of the methods to send keys to another process was able to make it into the guildwars client as is.. but i've spend some hours searching & checking out everything, As all methods had the same problem as mentioned above i chosen the most easy one for me to handle. After wich i found that guildwars did not accept the "enter" key.

For now it is solved, I'm using quiet a work around and it finaly works.. When i get more educated in c++ I might see it more clear.

Furthermore I know how wireshark works but c++ network related programming i still need to see.. (specialy interested in databases)

Thx for the help guys!
Locked