Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click event.

Status
Not open for further replies.

demopro

Programmer
Apr 23, 2001
117
US
Hello,

I need to write an app that can automate a task of clicking on a few buttons on several web pages from someone else’s website.

This is not malicious in any way. It will help me update some information on a timely manner.

An example would be the same as clicking on a button in a menu on a web page. Here is a section of code.

<a href="uebersicht.php" target="_top">Overview</a>

How do I in code mimic the clicking of this button?


Thanks,
Demopro
 
DemoPro, you're getting a response, only because you have obviously been here a while...

You can't hook into someone elses web-page and actually run their code. (ex: click event)


Depending on what you are doing there are probably several different ways around clicking.

If you are actually updating data in a datasource then you should be working with a webservice that can talk directly to the database.

If you are altering the look and feel of a website, but have identified a repeatable path then maybe you could get a click once button made.

If you are clicking on ad banners to increase hit count then you could potentially be aiding in a contract violation, which probably isn't worth the time/money it will cost you if they find out.

If you are actually writing something that appears malicious, but isn't several browsers/anti-virus programs will identify you are malicious, and you probably don't want that stigma strapped to your name.


If you still insist on this, there are plenty of ways to identify the location of the button and push it.
If you are

-Sometimes the answer to your question is the hack that works
 
Qik3Coder,
Thanks for the response. I know this may look like I am trying to do something on the evil side but I’m not. I didn’t mention what I was really trying to do because it is real geeky, to say the least.
I play on online game where I need to put my online character to work every eight hours and do other various things at certain times during the day. I could put my account on hold but that would set my character back (loss of opportunity) and I don’t want that.
So, I want to make a VB.Net application that can logon to a website, click a few buttons that would either put my character to work or to train while I am away on vacation for three weeks.
I think I found a solution to this but wanted to see if anyone else has had any advice on this topic. What I have so far is to bring a “WebBrowser” Control into my form and then “Navigate” to the desired website. From there I can go through the “Control.Item” to get to the buttons I need to click.
Again, sorry to raise any alarms but my intent is to keep my online character working while I am gone on vacation.

Demopro
 
HAHAHAHHAHA, ok, so is it better or worse that i have done something similar already...

Don't know if you ever played Horizons, but they had an online login with like 5 pages, that would then launch the actual game.

I made a little form that loaded logins and passwords from a text file, you selected the char and it would open an IE window in the program, nav thru the EULA and launch the game.


So, rather than clicking what you can do is actually nav to the page, wait for a long timer to elapse (letting the page load), then use sendKeys to tab to the control in question and send the enter or space key.

David

-Sometimes the answer to your question is the hack that works
 
Thank God I am not the only one that has run into this problem. Ha, ha, ha.

I have not played Horizons but will take a look at it. I am playing BiteFight.org it is a fun little game that I am hooked on. I don’t know why, but I am.

Thanks for the tip on sendKeys I will definitely use this tip.


Thanks,
Jim
 
it was a 3d client.

You are going to want to have either an every couple hours or several timers. Don't know how close they are watching activity, cause you will probably violate the EULA, with an automated sign in, let alone the actual game play.

May want to add a random couple minute wait after the timer actually ticks off.


-Sometimes the answer to your question is the hack that works
 
Man, I forgot about checking the EULA. I should take a look at it before I begin this process.

I will use a timer to launch this process every eight hours and will be only active for about a minute each time. This should not be to complicated. Now, I am all fired up and ready to start.

Thanks,
Jim
 
I would say there is a great chance that at least 50% here are going to be some kind of video game geek. :) Also, the regulars here are not going to laugh at you for asking a question. In fact as you've seen your more likely to get an answer the more forthright you are.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top