opening a site

Posts 1–13 of 13 · Page 1 of 1
opening a site
hey

i want to make a program for a browser based game.
so i wanted the program to open a site and fill in a text box. (as a start)
I googled how to do that. but all options i tried gave errors i don't understand.
so my questions are:

how do you open a site in C++?

how do you fill in a text box with C++?
Quote Originally Posted by lalakijilp View Post
hey

i want to make a program for a browser based game.
so i wanted the program to open a site and fill in a text box. (as a start)
I googled how to do that. but all options i tried gave errors i don't understand.
so my questions are:

how do you open a site in C++?

how do you fill in a text box with C++?
I don't exactly understand what you mean with the textbox thing. Here's how you can open a site.

Code:
#include <windows.h>
#include <shellapi.h>

int main()
{
    ShellExecute(NULL,"open","www.google.com",NULL,NULL,SW_SHOWNORMAL);
}
ShellExecute Function()

Make sure to include windows.h with shellapi.h or shellapi.h will give you errors.
You should use visual basic to do such kind of thing its really hard to do it in C++

Not shure:
C++ CANT output key's to other programs unless you make something like a virtual keyboard driver

You should look for autoclicker sources and autochat/spam sources they can be found all around the forum if you use the search button
Quote Originally Posted by Thats the way it is View Post
You should use visual basic to do such kind of thing its really hard to do it in C++

Not shure:
C++ CANT output key's to other programs unless you make something like a virtual keyboard driver

You should look for autoclicker sources and autochat/spam sources they can be found all around the forum if you use the search button
What?

Does that have anything to do with what he asked for?
Quote Originally Posted by Void View Post
What?

Does that have anything to do with what he asked for?
Opening a site ain't the problem. if he wants to output strings to a text box in a browser that is a problem becouse i dont think that is possible in c++ (or just very very hard)


Btw i just remeberd there are some Firefox plugins who can do this for you dont need C++ for it
lalakijilp can you explain in more detail what exactly you want. 'Cause trying to work with what i've understood from your original post is pretty hard.
Quote Originally Posted by Void View Post
lalakijilp can you explain in more detail what exactly you want. 'Cause trying to work with what i've understood from your original post is pretty hard.
ok.

i got bored with my tutorial (and school) so want to try something different
Bolknots My Brute
this is a game and when you get referrals you get points. so i want to make a program that makes referrals and trains them.

1. the site must be opened

2. TYPE HERE should be changed to something else.

3.validate must be pushed. and alot of other buttons...


Quote Originally Posted by Thats the way it is View Post
Btw i just remembered there are some Firefox plugins who can do this for you don't need C++ for it
greasemonkey???
Quote Originally Posted by lalakijilp View Post
ok.

i got bored with my tutorial (and school) so want to try something different
Bolknots My Brute
this is a game and when you get referrals you get points. so i want to make a program that makes referrals and trains them.

1. the site must be opened

2. TYPE HERE should be changed to something else.

3.validate must be pushed. and alot of other buttons...




greasemonkey???
i think you just answered your own problem there


If greasemonkey doesnt gives wat you want look for a scriptable autoclicker
Very hard in C++? :O Couldn't be any easier imo
Code:
HWND hWnd = FindWindow(NULL, "Title");
hWnd = FindWindowEx(hWnd, NULL, NULL, "messagebox title, use reshacker to find out");
PostMessage(hWnd, WM_SETTEXT, 0, MAKELPARAM("Text", "Text"));
Typed from the top of my head so could be a bit off
Quote Originally Posted by TehKiller View Post
Very hard in C++? :O Couldn't be any easier imo
Code:
HWND hWnd = FindWindow(NULL, "Title");
hWnd = FindWindowEx(hWnd, NULL, NULL, "messagebox title, use reshacker to find out");
PostMessage(hWnd, WM_SETTEXT, 0, MAKELPARAM("Text", "Text"));
Typed from the top of my head so could be a bit off
Would that actualy work if it's a browser based game? I don't think textbox's have their own window handles on browser games.
Quote Originally Posted by Void View Post
Would that actualy work if it's a browser based game? I don't think textbox's have their own window handles on browser games.
They don't. If it is a flash game, then there will only be the HTML and then Embedded flash.
Quote Originally Posted by Void View Post
Would that actualy work if it's a browser based game? I don't think textbox's have their own window handles on browser games.
not if its a browser based game, but you can always look into saving the swf or make an app that loads it from the site directly

edit: if its flash ofcourse :P
Starting a website is as simple as:

Code:
system("start http://www.google.com");
I don't have anything for filling in the text boxes though.
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?