Sign in to follow this  
Followers 0
Scottswan

Web Search Assistant

3 posts in this topic

I had a lot of help on this but it was a lot of fun and I really got my feet wet with AutoIt!

This script:

- Opens notepad

- Prompts for a search term and stores it as a variable

- Magically opens the default browser and loads Google

- Types the search term in Google and tabs to "I'm Feeling Lucky"

- Highlites and copies to the clipboard the text on the resulting page

- Parses the clipboard and (tries) to clip only the sentence(s) containing the search term.

- Writes the results to notepad

- loops to do another search

Known Bugs:

- Often writes much more than one sentence

- While writing to notepad, sometimes sends a File menu command but continues on

- No checking to make sure the Google result page loaded

- Search results aren't very good.... this was my 1st script afterall

-Scott

research_v1.au3

Share this post


Link to post
Share on other sites



Hmmmm...That's pretty neat! I like it, it works fine for me :)

Good work.


FootbaG

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This will save you a few tab positions if you want to link directly to results of "I'm feeling lucky" It might take some reformating of how you fetch though but it might help optomise some of that too.

an example direct link to search for search: autoit is

would be:

http://www.google.com/search?&q=autoit+is&...m+Feeling+Lucky

you can cut and paste this link into your browser which will load the autoit main page.

edit: or just click the link... caffine=good

edit2: you might also try:

InetGet("http://www.google.com/search?&q=autoit+is&btnI=I'm+Feeling+Lucky", @ScriptDir & "\mysearch.txt")

This way you can maybe just parse the text and not have to open a browser at all.

Edited by Coffee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0