Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Location
    USA
    Posts
    270

    Perl Script Wanted

    I have tried a macro, which records keystrokes and mouse movements, but that just isnt that reliable and stable. I want a script that opens up IE, goes to a site and copies a word (its an online word generator so the word would be different everytime), then goes to another site, finds the search button, pastes the word, and searches. It would delay for 5 or so seconds, and then close the browser. Then it would delay for another 40 seconds, and repeat until I closed the script.

    I realize this would probablly be hard to do which is why I might try learning whatever language needed to accomplish this script. If you think this is a simple task, or even a complex one, you sure are welcome to make the script for me, but I would understand if you dont. Could you tell me what language I should learn to make a script like this? Im not sure if Perl is the right language. And how/where would I learn it?

    Thanks very much.

  2. #2
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Do you mean you want a program to:
    1. fetch a web page
    2. parse the content searching for a word in a particular location
    3. send this word to a form in another web page

    If so then yes, perl will do this pretty simply (Google "perl LWP"). So will most other web-related languages.

    If you really need to manipulate IE through a program I think perl can do that too (there's a recent article somewhere) but that would be harder...

    Care to share what you plan to do with this?

  3. #3
    I am having a hard time understanding what the purpose of this is.

    If you just want a random word selector, download some word lists online and write a simple script to randomly seek to a position in the file (or line number) and grab the word.

    As for the second part, what are you saving or viewing from the search results?

    You dont really need IE to open at all for any of this, a commandline script could perform all these actions for you, including POSTing the random word to the search engine of your choice, and even parsing out the results.
    "The only difference between a poor person and a rich person is what they do in their spare time."
    "If youth is wasted on the young, then retirement is wasted on the old"

  4. #4
    Join Date
    Apr 2004
    Location
    USA
    Posts
    270
    I dont understand how I would do all this though. Perl seems somewhat confusing to me. Id prefer not to disclose what this is for.

    Okay once again, my goal is to pick a random word out of a huge list (my current list is almost 4k words. also note these words must be in a dictionary or real words). Take that word, goto a certian site such as google.com or whatever, and input that word into the search bar and search for it. Wait 40 seconds, and repeat.

  5. #5
    Join Date
    Apr 2004
    Location
    USA
    Posts
    270
    Originally posted by foobic
    Do you mean you want a program to:
    1. fetch a web page
    2. parse the content searching for a word in a particular location
    3. send this word to a form in another web page

    If so then yes, perl will do this pretty simply (Google "perl LWP"). So will most other web-related languages.

    If you really need to manipulate IE through a program I think perl can do that too (there's a recent article somewhere) but that would be harder...

    Care to share what you plan to do with this?
    Yes, thats pretty much exactly what I need done. I dont need IE open, in fact I dont need anything open except the script in command prompt, if perl is able to do all that without opening IE or anything.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •