Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   help?! (http://www.programmingforums.org/showthread.php?t=12175)

darkprogrammer Dec 12th, 2006 11:01 PM

help?!
 
Hey guys,
I have a prob and cant get any help anywhere so lets see if you guys can help me out! I have a job that includes me clicking 1000's of checkboxes per day! and my hand gets tired so I was wondering if you guys could program me something or give me a program or atleast point me in the right direction to getting a program that will automatically click the boxes on the page? that way I can get on to more important things to do! like other work! I was hoping you could make it run in the background of the web page with the boxes but if you cant that is alright too! So any suggestions, codes, or ideas?

Booooze Dec 12th, 2006 11:30 PM

Your best bet would probably be javascript. You could do it in a variety of languages, but some would require more code and experience. I'd say give Javascript a shot. No one here will code this for you (at least I highly doubt it). Look into it yourself, try it, and if you get stuck, post back here with your problem and we will try to help. If you don't want to do it yourself, there is a job offers forum. Start by googling javascipt tutorials. Remember, java ain't javascipt. Two different langauges. Good luck :)

ReggaetonKing Dec 12th, 2006 11:31 PM

Hm, so you have to click on check boxes on a website and you want to be able to launch a program to do it for you? A Java program can not access a website or fill in HTML form fields on a website.

titaniumdecoy Dec 13th, 2006 12:43 AM

You may be able to bypass the form by directly submitting a POST request via Java.

The author of this article on DevX.com claims to have developed a solution to submitting multi-part POST forms involving file uploads and cookies, and has made the (as he calls it) ClientHTTPRequest source code available for download. You can find docs for it as well.

There are a number of commercial Java APIs that provide the desired functionality, but I doubt you will consider that a viable option.

You may also want to look into the Java Robot API.

Booooze Dec 13th, 2006 2:45 PM

I was just going to say write little script to select all the checkboxes for you:p probably easier, why bother with the POST?

darkprogrammer Dec 14th, 2006 4:31 AM

that is what I was wanting actually booooze! lol a little script that will click them for me, for I have to check the boxes and the boxes select items to be downloaded once I get 1,000. so a post wouldnt quite do what I am wanting! lol Sorry to be such a pain, and I should have said that in my original post, however I didnt think it would matter, but I guess I was wrong eh?

kyndig Dec 16th, 2006 8:18 PM

This isnt a very good example of what you want. This was assuming the only content on the page was checkboxes.

:

Private Sub Command1_Click()
    With browser.Document
      'do some sort of loop through the checkboxes
            browser.SetFocus
            SendKeys "{TAB}"
            SendKeys "{ }"
    End With
End Sub


If you have the name of the form on the page, you can use something like.

browser.document.formname.checkbox.value = "1"

I think...


All times are GMT -5. The time now is 1:29 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC