Jump to content

Asari


iHonda
 Share

Recommended Posts

I present to you for your viewing pleasure (or displeasure) Asari! Asari literally means "to define" and that is just what this little program does, you simply type the term into the text field and click Define and before you know it, the program connects to google and brings up a page of definitions for you! This is still a project in the making, so it isn't really that complex or nice looking at the moment, as you will also notice this is the Alpha version meaning pre-beta meaning it still has errors and bugs that need to be worked out. So feel free to download the au3 file and give it a run, I would have compiled it but my anti-virus is being a pain.

Posted Image

Asari.au3

To Be Done:

-Remove Tray Icon

-Add Search Button

-Find a way to display only results without other parts of the page.

-Ensure compatibility on all systems

-Convert to a UDF for intigration with Hikaku

-Enhance GUI for appearance

Peace,

iHonda

Edited by iHonda

A great place to start Autoit 1-2-3

Link to comment
Share on other sites

Love the artwork!

Good execution.

However, not so sure of how useful the script is in real life.

Most times a browser is already up and running with an open google bar waiting for input.

Nice implementation, though.

Link to comment
Share on other sites

@fmen its not very practical now but with what I have planned for it later it should become useful, but thats not gonna be for a bit this was just a side project to learn how to embed the website

@toxicvn what do you mean?? which button?? the actual google button?

A great place to start Autoit 1-2-3

Link to comment
Share on other sites

try this out

#include <inet.au3>

$Definitions = _Define("music") ;Return a bi-dimensional array
$Definitions_IT = _Define("filosofia", ".it") ;Search in italian google for definitions and return the bi-dimensional array

For $i = 1 to $Definitions[0][0]
    MsgBox(0,"",$Definitions[$i][0] & @crlf & $Definition[$i][1] ;show infos
Next

Func _Define($KeyWord, $language = ".com")
    ;$language defines which google to use
    $url = "http://www.google" & $language & "/search?q=define%3A"
    $source = _INetGetSource($url&$KeyWord)
    $regexp = StringRegExp($source, "<li>(.*?)</p>",3)
    For $i = 0 to UBound($regexp)-1
        $url = StringRegExp($regexp[$i], "<font color=#008000>(.*?)</font>",1) ;get the url
        $regexp[$i] = StringRegExpReplace($regexp[$i], "<(.*?)>", "") ;remove tags from definition
        $regexp[$i] = StringReplace($regexp[$i], $url[0], "") ;remove url from definition
        Dim $aRet[UBound($regexp)][2]
        $aRet[$i+1][0] = $regexp[$i]
        $aRet[$i+1][1] = $url[0]
    Next
    $aRet[0][0] = UBound($regexp)-1
    $aRet[0][1] = UBound($regexp)-1
    Return $aRet
EndFunc

it returns a bi-dimensional array containing

in [0][0] and [0][1] the number of elements

in [n][0] the definition

in [n][1] the url to the definition

hope it will be useful :)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

Haven't tried it, but seeing your program defines things, why not link it to dictionary.com and thesaurus.com

they have too many ads on their page so it loads slower haha.

and this is indeed faster than loading a web browser if of course u comment out the splash bit when you load a web browser it checks for a bunch of stuff and does this and that. this is a bit faster but meh go ahead and be a pain in my rear

A great place to start Autoit 1-2-3

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...