Hi,

i need to type some commands at a specific time of day in the console of counter strike to connect to a server automatically...

i just need a way to type in the cs console... i can take care of the rest...

if anyone has any idea on how to do this plzz tell me even if you are not sure if it works and even if it works for a similar purpose ...


Thank you very very much...

i tried send keys...

in cs you hit "`" for the console to open and i wrote

Sendkeys(key.oem8)

but it doesnt work

any ideas?

I don't know about your game but this works for my game of Casino Empire.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ID As Integer
        Dim pr As New Process
        Dim p() As Process = Process.GetProcesses
        For Each pr In p
            If pr.MainWindowTitle.ToString = "Casino Empire" Then
                ID = pr.Id
                Exit For
            End If
        Next
        AppActivate(ID)
        Sleep(7000)
        For x As Int16 = 1 To 10
            My.Computer.Keyboard.SendKeys("{RIGHT}")
        Next
    End Sub

The sleep is in there to give me time to bring up the game. I don't know why the AppActivate doesn't.
I would use this with a NotifyIcon program and keep it in the tray so when it is triggered then it is not taking up desktop space.

thank you waynespangler, your method works fine...

its just that i cant set the focus to the console within the game before it writes those commands...

any ideas
thnx anyway

This article has been dead for over six months. Start a new discussion instead.