Very Basic Programming Help

should be a couple of easy questions

Page 1 of 1

8 Replies - 743 Views - Last Post: 17 February 2008 - 08:59 PM Rate Topic: -----

#1 mfei  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-February 08

Very Basic Programming Help

Posted 16 February 2008 - 11:24 PM

Hi, I am a complete amateur to programming. I'm pretty good with computers, but I know nothing about programming. I just wanted to write a program that would click in certain spots and type and close windows. I'm trying to write this so I can play a game, so when I run the program, it will click the icon on my desktop, run the game, type in my username and password, then wait for me to type in the image verification code (unless there is some way it could recognize that, that would be AMAZING) and then close the game. This game is really hard to log in to and there's no waiting queue or anything, and if you don't log in, it forces you out of the game, so it often takes me half an hour to an hour just to log in. I just need some instructions on how I could go about to program such a program. I would download something off the web, but I'm afraid someone might hide a keylogger in it and steal my account :(. I think the program should be pretty basic, although it might not be, I really don't know. Thanks in advance for any help!

Is This A Good Question/Topic? 0
  • +

Replies To: Very Basic Programming Help

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3088
  • View blog
  • Posts: 19,136
  • Joined: 14-September 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:36 AM

You want a bot? I'm confused on why you can't type in your own information....
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is online

  • Head MFIC
  • member icon

Reputation: 5061
  • View blog
  • Posts: 26,434
  • Joined: 10-May 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:43 AM

Yeah, sounds a bit overwhelming for your 1st C++ application. Maybe you should look into VB, I'm sure this kind of thing has been done to death.
Was This Post Helpful? 0
  • +
  • -

#4 Spikes of Christ  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 30
  • Joined: 19-December 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:46 AM

all this is very possible in any language. I would sugest java because the robot package makes like 100 times easier, also if you get an OCR (optical character recognition) you can automate the entire image verification process...
If I remember tomorow when I wake up I'll whip something up.

Edit:
Here it's almost 5 am here so I'll finish it tomorow... as of now it doesn't do anything noticeable.
import java.awt.Robot;
import java.awt.event.InputEvent;

public class BotExample 
{

	public static void main(String[] args) throws Exception
 {
	Robot BotExample = new Robot();
  }
}


This post has been edited by Spikes of Christ: 17 February 2008 - 02:51 AM

Was This Post Helpful? 0
  • +
  • -

#5 mfei  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-February 08

Re: Very Basic Programming Help

Posted 17 February 2008 - 09:24 AM

Well I'm not sure if C++ is the right spot in the forums, I just put it under a forum because I'm not sure it would go under. I wanted to make one so I didn't have to do the clicking, but I agree it's pretty useless without being to auto type in the code. And Spikes of Christ, if you would do that, that would be GREAT. But if not, could someone point me in the right direction?
Was This Post Helpful? 0
  • +
  • -

#6 Spikes of Christ  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 30
  • Joined: 19-December 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:35 PM

I need more information on this...
Does it have to loop (like repeat, click the icon then attempt to login) or does it only have to do it once?

Here is a simple program that will allow you to input the x and y coord and then click to open the program... from here you'd need a timer to wait until the game loads, then have it outprint the username and password, then have it attempt login. This is all I can do without more information about the game.
/*
Quick Bot Example by Spikes of Christ - 2/17/08
Automated clicking and typing
*/

#include <iostream>
#include <stdlib.h>
#include <windows.h>

using namespace std;

int main()
{
	SetConsoleTitle("Bot Example");
	{
		int x,y,;

		cout << "X Coordinate: " << endl;
		cin >> x;
		cout << "Y Coordinate: " << endl;
		cin >> y;
		SetCursorPos(x,y);
		mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
		mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
	}
}



Wrote it in C++ (specifically Dev-C++ so you can compile it yourself). Wanted to write it in Java but for the spirit of this section I changed my mind :P

This post has been edited by Spikes of Christ: 17 February 2008 - 02:37 PM

Was This Post Helpful? 0
  • +
  • -

#7 Bench  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 854
  • View blog
  • Posts: 2,338
  • Joined: 20-August 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:45 PM

View Postmfei, on 17 Feb, 2008 - 06:24 AM, said:

I think the program should be pretty basic, although it might not be, I really don't know. Thanks in advance for any help!

as a C++ program, pretty complicated (Especially if you're new to programming).
- You could probably download or buy software which lets you create macro's. IIRC, Win3.x used to support that kind of thing as a standard feature - I've never seen it in more recent versions of windows, though I'd be surprised if such a thing didn't exist as a 3rd party utility app.
Was This Post Helpful? 0
  • +
  • -

#8 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2246
  • View blog
  • Posts: 9,236
  • Joined: 18-February 07

Re: Very Basic Programming Help

Posted 17 February 2008 - 02:49 PM

if I got the drift correctly here you actually don't need anything as heavy handed as C++ or Java etc. You probably want something like AutoHotKey it is great for making little macro programs that move the cursor, click here and there, and fill out fields etc.
Was This Post Helpful? 0
  • +
  • -

#9 mfei  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 16-February 08

Re: Very Basic Programming Help

Posted 17 February 2008 - 08:59 PM

Well I'm trying out the autohotkey program, I'm going to see if it works, thanks! And Spikes of Christ, that doesn't have an OCR right? And do I put that string of commands in a command prompt window or what? Do I need to download some program to put in the code?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1