My friends and I are in true nerd fashion planning on trying out something similar to Dungeons & Dragons, while communicating through our mumble server.
Anyway, I understand that dice rolls are important for this and since I will start attending university to study programming in September, I figured I'd brush up on some Java-knowledge by writing a dice bot for mumble in Eclipse.
The way I did this is pretty unusual and un-effective, but hey - at least it works. So don't hate on it! :P I did it by basically reading the pixels of the most recent chat message, then comparing it to a known image of a command to see if the message contains the command. I got everything working except for the one thing I didn't anticipate having problems with:
The bot responding. I'm trying to use a Java object called "Robot" which basically sends key-clicks, just as if the user would have pressed that same key on his keyboard. The problem is that it doesn't seem to be able to actually type in the chat window for some reason. It works great if I shift the window focus to for example a random notepad window, but it is just not able to type in the chat window.
I was wondering if mumble has some anti-spam protection or something similar built-in that prevents 3rd party-programs to "interfere" with the chat or something? I don't see any reason why this shouldn't work code-wise, since it works so well typing in notepad or what-ever text editor you prefer. The key clicks are sent, the mumble chat has focus, but the text just doesn't appear.
I don’t know of any such thing.
Are you aware of Ice? :)
You could easily hook a server side script onto chat messages, if that is what you are doing. If it is client side … oh well.
Mumble is running in an elevated privilege mode to be able to capture input from games running in administrator mode. I'm guessing - I haven't looked into all the side-effects - this might cause normal applications to be disallowed from messing with it. Try running your application with administrator privileges.
My god! I feel so stupid! Thanks, just putting it in administrator-mode fixed it instantly!
Nice. Have fun ;)
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.