Results 1 to 4 of 4

Thread: This may sound wierd.. C# & Online Games?

  1. #1

    Thread Starter
    Hyperactive Member kleptos's Avatar
    Join Date
    Aug 2001
    Location
    The Dark Carnival
    Posts
    346

    This may sound wierd.. C# & Online Games?

    Ok, this may sound wierd, and i am sure i am going out on a limb asking this but i dont know where else to look. Currently a friend of mine plays a few online games, UO, Everquest, Etc... He wants a small program that he can run along with these games to do things for him instead of him having to do meanial things. I can create most of what he's looking for but i am not sure how to get C# to make keystokes and mouse moves inside of the game itself. Like if i open the C# application and tell it to cycle thru a few lines of script, it will, but i need to get it to run through the code as if the person types the commands in the game. Make Sense? I Hope So... Any help would be much appreciated.
    ..::[kleptos]::..
    • Database Administrator (MSSQL 2000)
    • Application Developer (C#)
    • Web Developer (ASP.NET)


  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    This can be as easy as you make it. Basically what you want to do is get the window handle of the program, and send different keystroke of the commands that you want to do.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Hyperactive Member kleptos's Avatar
    Join Date
    Aug 2001
    Location
    The Dark Carnival
    Posts
    346
    Silly Question But.... How do i get the handle? I should know this im sure, but i havent tried anything like this....
    ..::[kleptos]::..
    • Database Administrator (MSSQL 2000)
    • Application Developer (C#)
    • Web Developer (ASP.NET)


  4. #4
    Lively Member DJ P@CkMaN's Avatar
    Join Date
    Jan 2002
    Location
    Burpengary, Queensland, Australia
    Posts
    95
    the title of the window.. eg. a new instance of notepad is

    Untitled - Notepad

    so i have never played either of those games so i couldnt tell you what they are but i only know the VB6 way to do it cuz im not lucky enough too have a copt of VS.NET but its like this

    Private Sub Command1_Click
    AppActivate("Untitled - Notepad")
    SendKeys("+ Keys you want to send +")
    End Sub


    thats how it works,
    hope that helps
    There's something I've noticed in the last year or so...
    Australian's are good at EVERYTHING !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width