Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27333

Send keys to game using visual basic application

$
0
0
Hi I'm sorry to ask this but I like cheating in games Ive completed and creating trainers for the games so here is what I'm trying to do. I have started a project in visual basic 2008. It has two buttons and each buttons properties look like this
Code:

Public Class Form1

    Private Sub Vbs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resources.Click
        AppActivate("nations")
        SendKeys.Send("{ENTER}")
        SendKeys.Send("cheat resources all {+}{(}90000{)}")
        SendKeys.Send("{ENTER}")
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Instant_Build.Click
        AppActivate("nations")
        SendKeys.Send("{ENTER}")
        SendKeys.Send("cheat finish")
        SendKeys.Send("{ENTER}")
    End Sub
End Class

what this does in the game is the one "Resources" gives me 9000 resources by typing in the cheat and the other "Instant_build" makes what ever object you are clicked on finish what ever thing it was doing. I've tested the application on notepad and it sends the keys exactly how I want it too but when I change the appactive to what it is as you see it in the code nothing happens at all. Could somebody please help me to get this working. I would really appretiate it. Once I've got it sending correctly I want to add hotkeys too the buttons so that while I'm in the game I can activate/click each button thank you in advance for your help

Viewing all articles
Browse latest Browse all 27333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>