Jump to content

Taking actions in MINIMIZED window? Is it even possible?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
anonymousb

anonymousb

    Newbie

  • Members
  • Pip
  • 1 posts
Hello!

I'm working on my frist C# "serious" project.

I have a small, simple online game written by my older brother and I want to write a simple bot for this game.

I want to write a C# bot that will be clicking right mouse button every 5 seconds in game window. It's easy, because there's a lot info about mouse/keyboard events in C#.

So the hard part - I want this window to be minimized at the same time.

Is there any way of doing this? Some hook, hack, bug anything like that? I want it to work under Windows 7 Ultimate or at least Windows XP.

Any ideas?

Thanks a lot!

#2
Davide

Davide

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 506 posts
Yes, i am sure you can do that, it doesn't matter if it's minimized. It doesn't even have to be displayed:
Form1 newForm = new Form1();
newForm.MousePosition = 4;
newForm.otherStuff = 2;
newForm.Show(); //So you can change stuff without having to display the form
Make sure you make a way to stop the mouse moving so you can close the bot.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics