I'm trying to make a function that will allow a user to have their web browser (for me it's waterfox) open at the same time as the application, and using a textbox interface, will allow their keystrokes to go to the web browser.
If you're wondering what purpose this would serve, it's a scoreboard application for an in-browser game that has a chat function, so the goal is the be able to use the ingame chat function without having to click away from the scoreboard application.
Here is what i have as of now:
The TAB function is the keybinding to enable chat, and then ENTER to send it to the server. The above code does work, but that will open up a NEW browsing window and then type a predetermined text value. What my end goal is to have it send the text that is typed into the textbox to the already opened browsing window that has the game.
If you're wondering what purpose this would serve, it's a scoreboard application for an in-browser game that has a chat function, so the goal is the be able to use the ingame chat function without having to click away from the scoreboard application.
Here is what i have as of now:
Code:
Private Sub txtchat_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtchat.TextChanged
Dim a As New Process
a.StartInfo.FileName = "C:\Program Files\Waterfox\waterfox.exe"
a.Start()
Thread.Sleep(10000)
SendKeys.Send("{TAB}")
SendKeys.Send("test")
SendKeys.Send("{ENTER}")
End Sub